[TriLUG] cronolog syntax

Ryan Wheaton ryan.wheaton at comcast.net
Wed Nov 12 14:17:53 EST 2003


Anyone out there using cronolog for their apache log organization?

It's doing fine generating logs in the format that I want, but the docs 
say that there's a way to create a symlink to both the current log 
file, and the previous log file.  I can't get it to do the previous 
symlink....  here's what the docs say:

SYNOPSIS
        cronolog [OPTION]... template
<snip>
Options
<snip>
-S NAME

        --symlink=NAME

        -l NAME

        --link=NAME
               maintain a symbolic link from NAME to the current log 
file.

        -P NAME

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

this is how i'm invoking the command in my httpd.conf

CustomLog "|/usr/local/sbin/cronolog 
--symlink=/opt/logs/fe01_access_log 
--prevlink=/opt/logs/fe01_access_log_last 
/opt/logs/fe01_access_log-%Y%m%d-%H" combined

the previous syntax must be completely wrong because cronolog never 
even gets started (nor do the symlinks get created).  but.. on the 
website, it says that it is invoked using (which doesn't work either):

CustomLog "|/usr/local/sbin/cronolog 
--symlink=/opt/logs/fe01_access_log 
--prev-symlink=/opt/logs/fe01_access_log_last 
/opt/logs/fe01_access_log-%Y%m%d-%H" combined

and this is the directory listing, showing what the symlinks point to 
(when they actually get created)....

37 Nov 12 11:54 fe01_access_log -> /opt/logs/fe01_access_log-20031112-12
312835 Nov 12 11:54 fe01_access_log-20031112-11
7585 Nov 12 12:00 fe01_access_log-20031112-12
37 Nov 12 11:54 fe01_access_log_last -> 
/opt/logs/fe01_access_log-20031112-12


any ideas on what i'm doing wrong?  it's probably something really 
stupid, but i've tried about a million different combos of options....

-r




More information about the TriLUG mailing list