MirBSD manpage: rotatelogs(8)

ROTATELOGS(8)            BSD System Manager's Manual             ROTATELOGS(8)

NAME

     rotatelogs - rotate Apache logs without having to kill the server

SYNOPSIS

     rotatelogs logfile rotationtime [offset]

DESCRIPTION

     rotatelogs is a simple program for use in conjunction with httpd(8)'s
     piped logfile feature which can be used like this:

           TransferLog "| rotatelogs /path/to/logs/access_log 86400"

     This creates the files /path/to/logs/access_log.nnnn where nnnn is the
     system time at which the log nominally starts (this time will always be a
     multiple of the rotation time, so you can synchronize cron(8) scripts
     with it). At the end of each rotation time (here, after 24 hours), a new
     log is started.

     The arguments are as follows:

     logfile       The path plus basename of the logfile. If logfile includes
                   any percent characters ('%'), it is treated as a format
                   string for strftime(3). Otherwise, the suffix .nnnn is au-
                   tomatically added and is the time at which the logfile was
                   created.

     rotationtime  The rotation time in seconds.

     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 ar-
                   gument.

SEE ALSO

     strftime(3), cron(8), httpd(8), logresolve(8)

MirBSD #10-current              March 19, 2008                               1

Generated on 2022-12-24 01:00:14 by $MirOS: src/scripts/roff2htm,v 1.113 2022/12/21 23:14:31 tg Exp $ — This product includes material provided by mirabilos.

These manual pages and other documentation are copyrighted by their respective writers; their sources are available at the project’s CVSweb, AnonCVS and other mirrors. The rest is Copyright © 2002–2022 MirBSD.

This manual page’s HTML representation is supposed to be valid XHTML/1.1; if not, please send a bug report — diffs preferred.

Kontakt / Impressum & Datenschutzerklärung