Jan 19, 2021, 03:36 AM

News:

GinGly.com - Used by 85,000 Members - SMS Backed up 7,35,000 - Contacts Stored  28,850 !!


Cronolog usage

Started by sukishan, Aug 23, 2009, 12:43 AM

previous topic - next topic
Go Down

sukishan

Cronolog usage
The cronolog package consists of two programs: cronolog and cronosplit. There is a manual page for each in PDF format (cronolog and cronosplit)
The cronolog program
The cronolog program is normally invoked as a piped log filter program from Apache as specified in the configuration file. The direct program usage is:
/path/to/cronolog [OPTIONS] logfile-spec
The logfile-spec is a template that describes the names of the log files that should be written. Each character in the template represents a character in the expanded filename, except for date and time format specifiers, which are replaced by their expansion. Format specifiers consist of a "%" followed by a character as described in the table below. However it would normally be used in an Apache CustomLog directive as so:
CustomLog "|/path/to/cronolog [OPTIONS] logfile-spec" [format]
Note that the entire cronolog command line is enclosed within quotes and preceded by a vertical bar ("|"). The quotes cause Apache to regard the command line as a single argument and the presence of the vertical bar tells Apache that this is a piped log and that the command line is passed to the shell.
cronolog options
Long form Short                         form                  Meaning
--hardlink=NAME                     -H NAME           maintain a hard link from NAME to the current log file 
--symlink=NAME                     -S NAME           maintain a symbolic link from NAME to the current log file
--prev-symlink=NAME             -P NAME            maintain a symbolic link from NAME to previous log
--link=NAME                           -l NAME             same as -S/--symlink
--help                                    -h                     print a help message then exit
--period=PERIOD                    -p PERIOD         set the rotation period explicitly (new in 1.6.2)
--delay=DELAY                                               set the rotation period delay (new in 1.6.2 -- this will be renamed --rotation-                                                                     offset with a short form of -o in 1.6.3)
--once-only                                                    create single output log from template (not rotated)
--debug=FILE                      -x FILE                 write debug messages to FILE ( or to standard error if FILE is "-")
--american                          -a                        Interprete ambiguous start dates in American date formats (mm/dd/yy[yy])
--european                          -e                        Interprete ambiguous start dates in European date formats (dd/mm/yy[yy] - default)
--start-time=DT                   -s DT                     starting date and time (in ambiguous cases interpreted according to --             
                                                                     american  or --european specification)
--time-zone=TZ                    -z   TZ                 use TZ for timezone
--version                                -V                     print version number, then exit

Template specifiers
Specifier Description
%%          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 cannot 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 .. Saturday)
%b       the locale's abbreviated month name (e.g.: Jan .. Dec)
%B       the locale's full month name, (e.g.: January .. December)
%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 Britain: "15/12/96")
%y     year without the century (00 .. 99)
%Y     year with the century (1970 .. 2038)
A good beginning makes a good ending

Go Up
 

Quick Reply

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Note: this post will not display until it's been approved by a moderator.
Name:
Email:
Verification:
Please leave this box empty:

Type the letters shown in the picture
Listen to the letters / Request another image

Type the letters shown in the picture:

shortcuts: alt+s submit/post or alt+p preview
IT Acumens Web Designing Chennai | GinGly :: Build your Personal Website | CineBuzz :: Cinema News | My Kids Diary :: Kids Memories Writing :: Book Website @ 349 Rs monthly
Copyright 2005 - 2020 :: IT Acumens :: All Rights Reserved. :: Sitemap
ITAcumens Discussion Forum with 2 lakhs post running for 15 years - Powered by IT Acumens Dedicated Server