Filewatcher File Search File Search
Content Search
» » » » » cronolog_1.6.2+rpk-1_sparc.deb » Content »
pkg://cronolog_1.6.2+rpk-1_sparc.deb:29046/usr/share/man/man1/  info  control  downloads

cronolog - Logfile rotator for web servers…  more info»


cronolog(1m)                                            cronolog(1m)

       cronolog - write log messages to log files named according to
       a template

       cronolog [OPTION]... template

       cronolog is a simple program that reads log messages from its
       input  and writes them to a set of output files, the names of
       which are constructed using template and the current date and
       time.   The  template  uses the same format specifiers as the
       Unix date(1) command (which are the same as  the  standard  C
       strftime library function).

       Before  writing  a  message  cronolog  checks the time to see
       whether the current log file is still valid  and  if  not  it
       closes  the current file, expands the template using the cur‐
       rent date and time to generate a new file name, opens the new
       file (creating missing directories on the path of the new log
       file  as  needed  unless  the  program   is   compiled   with
       -DDONT_CREATE_SUBDIRS)  and  calculates the time at which the
       new file will become invalid.

       cronolog is intended to be used in  conjunction  with  a  Web
       server,  such as Apache to split the access log into daily or
       monthly logs.  For example the  Apache  configuration  direc‐

               TransferLog                       "|/usr/bin/cronolog
               ErrorLog                          "|/usr/bin/cronolog

       would  instruct  Apache to pipe its access and error log mes‐
       sages into separate copies of cronolog,  which  would  create
       new log files each day in a directory hierarchy structured by
       date, i.e. on 31 December 1996 messages would be written to


       after midnight the files


       would  be  used,  with  the  directories  1997,  1997/01  and
       1997/01/01  being  created  if  they  did  not already exist.
       (Note that prior to version 1.2 Apache did not allow  a  pro‐
       gram  to  be specified as the argument of the ErrorLog direc‐

       cronolog accepts the following options and arguments:

       -H NAME

              maintain a hard link from  NAME  to  the  current  log

       -S NAME


       -l NAME

              maintain  a symbolic link from NAME to the current log

       -P NAME

              maintain a symbolic link from NAME to the previous log
              file.   Requires  that  the --symlink option is speci‐
              fied, as cronolog renames the current link to the name
              specified for the previous link.


       --help print a help message and then exit.

       -p PERIOD

              specifies  the  period explicitly as an optional digit
              string followed by one  of  units:  seconds,  minutes,
              hours,  days,  weeks  or  months.  The count cannot be
              greater than the number of units in  the  next  larger
              unit,  i.e.  you cannot specify "120 minutes", and for
              seconds, minutes and hours the count must be a  factor
              of  the next higher unit, i.e you can specify 1, 2, 3,
              4, 5, 6, 10, 15, 20 or 30 minutes but not say  7  min‐

       -d PERIOD

              specifies  the  delay  from  the  start  of the period
              before the log file is rolled over.  For example spec‐
              ifying  (explicitly or implicitly) a period of 15 min‐
              utes and a delay of 5 minutes results in the log files
              being rotated at five past, twenty past, twentyfive to
              and ten to each hour.   The  delay  cannot  be  longer
              than the period.


              create  single  output log from template, which is not

       -x FILE

              write debug messages to FILE or to the standard  error
              stream  if FILE is "-".  (See the README file for more

       -s TIME

              pretend that the starting time is TIME (for  debugging
              purposes).   TIME  should  be  something like DD MONTH
              YYYY HH:MM:SS (the day and month are reversed  if  the
              american  option  is  specified).   If the seconds are
              omitted then they are taken as zero and if  the  hours
              and  minutes are omitted then the time of day is taken
              as 00:00:00 (i.e. midnight).  The day, month and  year
              can be separated by spaces, hyphens (-) or solidi (/).


              Interprete  the  date  part  of  the starting time the
              American way (month then day).


              Interprete the date part  of  the  starting  time  the
              European way (day then month).  This is the default.


              print version information and exit.

Template format
       Each  character in the template represents a character in the
       expanded filename, except for date  and  time  format  speci‐
       fiers,  which are replaced by their expansion.  Format speci‐
       fiers consist of a `%' followed by one of the following char‐

       %      a literal % character

       n      a new-line character

       t      a horizontal tab character

       Time fields:

       H      hour (00..23)

       I      hour (01..12)

       p      the locale's AM or PM indicator

       M      minute (00..59)

       S      second (00..61, which allows for leap seconds)

       X      the locale's time representation (e.g.: "15:12:47")

       Z      time zone (e.g. GMT), or nothing if the time zone can‐
              not be determined

       Date fields:

       a      the locale's abbreviated weekday name (e.g.: Sun..Sat)

       A      the locale's full weekday name (e.g.: Sunday .. Satur‐

       b      the locale's abbreviated month name (e.g.: Jan .. Dec)

       B      the locale's full month name, (e.g.: January .. Decem‐

       c      the locale's date and time (e.g.: "Sun Dec 15 14:12:47
              GMT 1996")

       d      day of month (01 .. 31)

       j      day of year (001 .. 366)

       m      month (01 .. 12)

       U      week  of  the  year  with  Sunday as first day of week
              (00..53, where week 1 is the week containing the first
              Sunday of the year)

       W      week  of  the  year  with  Monday as first day of week
              (00..53, where week 1 is the week containing the first
              Monday of the year)

       w      day of week (0 .. 6, where 0 corresponds to Sunday)

       x      locale's  date  representation (e.g. today in April in
              Britain: "13/04/97")

       y      year without the century (00 .. 99)

       Y      year with the century (1970 .. 2038)

       Other  specifiers  may  be  available  depending  on  the   C
       library's implementation of the strftime function.

       apache(1m) date(1) strftime(3) environ(5)

       More  information  and  the latest version of cronolog can be
       obtained from


       If you have any suggestions, bug reports, fixes, or  enhance‐
       ments, please mail them to the author.

   More about Apache
       Documentation for the Apache http server is available from


       The  functionality  of  cronolog  could be built into Apache,
       thus saving the overhead of having a process per  log  stream
       and  that of transferring data from the server process to the
       cronolog process.  The main complication is handling the case
       where multiple log streams are written to the same file (tem‐
       plate), for example where different virtual servers write  to
       the same set of log files.

       Andrew Ford <>

       cronolog  is based on a program called rotatelogs by Ben Lau‐
       rie, which is packaged with the Apache web server.

       The symbolic link option was suggested by Juergen Lesny.

                             March 1998                 cronolog(1m)
Results 1 - 1 of 1
Help - FTP Sites List - Software Dir.
Search over 15 billion files
© 1997-2017