logrotate

package
v1.59.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 28, 2022 License: Apache-2.0, BSD-2-Clause, MIT, + 1 more Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Config

func Config(pathConfig, pathLogFiles, prefix string) ([]extensionsv1alpha1.Unit, []extensionsv1alpha1.File)

Config returns the content for logrotate units and files. Whenever logrotate is ran, this config will:

  • rotate the log file if its size is > 100Mb OR if one day has elapsed
  • save rotated logs into a gzipped timestamped backup
  • log file timestamp (controlled by 'dateformat') includes seconds too. This ensures that logrotate can generate unique logfiles during each rotation (otherwise it skips rotation if 'maxsize' is reached multiple times in a day).
  • keep only 14 old (rotated) logs, and will discard older logs.

prefix carries the target container runtime such as (containerd, docker)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL