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: newbie question, logging to multiple vhosts (also progress report)



Alan Sparks wrote:

Just started looking at cronolog, new member to list.  Sorry for what
will undoubtably be a FAQ...

Is there inherent dangers to having multiple cronologs trying to write
to (and maintain) a log file?  Say I have a couple of VirtualHosts like:

<VirtualHost 1.2.3.4:80>
 TransferLog "|cronolog /path/to/logfile-%d"
</VirtualHost>

<VirtualHost 1.2.3.4:443>
 TransferLog "|cronolog /path/to/logfile-%d"
</VirtualHost>

This will start multiple cronologs, working the same file... Is there
going to be trouble when one of them decides it's log rotation time?  If
it's trouble, is there ways to deal with multiple vhosts needing to log
to the same file?

Thanks.
-Alan


This should work OK.

The new version of cronolog will include the option to parse each log record and split on a specified field, so you will be able to say something like:

  LogFormat  "%v ..."  vhostlabelled
  Customlog "|cronolog -X 1* */path/to/logfiles/@1/log-%Y-%m-%d"

(where the ... is the format string specifiers for common log format)

This will split on the 1st field, substituting for @1 in the log file template and remove that field from the output.

I haven't worked out the exact semantics yet, but it will allow you to just have a single cronolog process processing all transfer logs for all virtual hosts.

As to when I'll get this version ready -- I did some work on it over Christmas, but I am in a rush at work at the moment and nothing is going to happen for the next week, but hopefully after that. I have been getting to grips with GNU autoconf and automake and I should be able to get rid of the old "doesn't compile on BSD without editing the source bug" (I'll retrofit that to the old version of cronolog too).

Regards
Andrew

--
Andrew Ford, Director Ford & Mason Ltd / Pauntley Press
A.Ford@xxxxxxxxxxxxxxxx South Wing, Compton House www.ford-mason.co.uk Compton Green, Redmarley Tel: +44 1531 829900
www.pauntley-press.co.uk Gloucester, GL19 3JB Fax: +44 1531 829901
www.refcards.com Great Britain Mobile: +44 7785 258278





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