-l Causes the use of local time rather than GMT as the base for the interval or for strftime(3)
formatting with size-based rotation.
-Llinkname-pprogram
If given, rotatelogs will execute the specified program every time a new log file is opened. The
filename of the newly opened file is passed as the first argument to the program. If executing
after a rotation, the old log file is passed as the second argument. rotatelogs does not wait for
the specified program to terminate before continuing to operate, and will not log any error code
returned on termination. The spawned program uses the same stdin, stdout, and stderr as rotatelogs
itself, and also inherits the environment.
-f Causes the logfile to be opened immediately, as soon as rotatelogs starts, instead of waiting for
the first logfile entry to be read (for non-busy sites, there may be a substantial delay between
when the server is started and when the first request is handled, meaning that the associated
logfile does not "exist" until then, which causes problems from some automated logging tools)
-D Creates the parent directories of the path that the log file will be placed in if they do not
already exist. This allows strftime(3) formatting to be used in the path and not just the
filename.
-t Causes the logfile to be truncated instead of rotated. This is useful when a log is processed in
real time by a command like tail, and there is no need for archived data. No suffix will be added
to the filename, however format strings containing '%' characters will be respected.
-T Causes all but the initial logfile to be truncated when opened. This is useful when the format
string contains something that will loop around, such as the day of the month. Available in 2.4.56
and later.
-v Produce verbose output on STDERR. The output contains the result of the configuration parsing, and
all file open and close actions.
-e Echo logs through to stdout. Useful when logs need to be further processed in real time by a
further tool in the chain.
-c Create log file for each interval, even if empty.
-nnumber-of-files
Use a circular list of filenames without timestamps. This option overwrites log files at startup
and during rotation. With -n 3, the series of log files opened would be "logfile", "logfile.1",
"logfile.2", then overwriting "logfile". When this program first opens "logfile", the file will
only be truncated if -t is also provided. Every subsequent rotation will always begin with
truncation of the target file. For size based rotation without -t and existing log files in place,
this option may result in unintuitive behavior such as initial log entries being sent to
"logfile.1", and entries in "logfile.1" not being preserved even if later "logfile.n" have not yet
been used. Available in 2.4.5 and later.
logfilerotationtime
The time between log file rotations in seconds. The rotation occurs at the beginning of this
interval. For example, if the rotation time is 3600, the log file will be rotated at the beginning
of every hour; if the rotation time is 86400, the log file will be rotated every night at
midnight. (If no data is logged during an interval, no file will be created.)
filesize(B|K|M|G)
The maximum file size in followed by exactly one of the letters B (Bytes), K (KBytes), M (MBytes)
or G (GBytes). .PP When time and size are specified, the size must be given after the time.
Rotation will occur whenever either time or size limits are reached.
offset The number of minutes offset from UTC. If omitted, zero is assumed and UTC is used. For example,
to use local time in the zone UTC -5 hours, specify a value of -300 for this argument. In most
cases, -l should be used instead of specifying an offset.