cronolog.org
flexible web log rotation
HOME
DOWNLOAD
FEATURES
USAGE
FAQ
BLOG
KNOWN BUGS
SECURITY
PATCHES
USERS
TO DO
HISTORY
LINKS
FEEDBACK
MAILING LIST
ADVERTISING

support cronolog development



Google   HELP


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CRONOLOG: Mod_cronolog ?




Ward Vandewege wrote:

> Not quite I'm afraid. First of all - in my experience - mod_cronolog
> won't work for the ErrorLog (unless there's something I've missed,
> anyone?).

I have used it on error files for some time now. My config for most instances is:

 ErrorLog "|/web/apache/libexec/cronolog_daily com err"
 CustomLog "|/web/apache/libexec/cronolog_hourly com log" combined

And cronolog_hourly/daily are wrapper scripts, like:

------------------ cronolog_daily
#!/bin/sh

site=$1
type=$2

path=`dirname $0`

exec $path/cronolog -a /web/logs/apache/%Y/%m/%d/$site.$type
------------------

------------------ cronolog_hourly
#!/bin/sh

site=$1
type=$2

path=`dirname $0`

exec $path/cronolog -a /web/logs/apache/%Y/%m/%d/$site-%H.$type
------------------

The reason for the scripts is because of how many instances I have to manage, this just makes it easier. The reason for the hourly rotation is because of the size of the logfiles. 2003/02/04's logfiles (yesterday) on my two production servers add up to 136MB total. I only rotate the error file daily because there are less errors :)

hope this helps.

-Brandon



Copyright © 1996-2010 Andrew Ford and Ford & Mason Ltd