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: Q: is this acceptable way to use cronolog?



This is a reasonable approach. The log files are opened in cronolog with O_APPEND
and the writes should be atomic (at least on non-NFS disks -- see the open(2) manpage).
However I've not tested it on a very heavily loaded server.


Andrew

Ian 'Ivo' Veach wrote:

Greetings -

We've got a log format that is essentially combined with a virtual host
(%v) mushed on the front of it.  We want to use a global config (outside
all virthosts) for cronolog:

CustomLog "|/usr/local/sbin/cronolog /logs/access_log.%Y%m%d" cspec

that is used as a global setting for all virtual servers.  in addition,
since SSL logging requires a redefine of pre-existing logging, we also
will have a repeated entry in all SSL virt servers:

CustomLog "|/usr/local/sbin/cronolog /logs/access_log.%Y%m%d" cspec


So essentially we wanted all logging (access) to go into one file with %v tacked on the front of it. We have less files to manage (parsing them for indivual statistics but keeping the master log for archival).

My question: will there be multiple cronolog processes clobbering the logs
(e.g. perhaps overwriting log entries) as each of them attempts to write
to that single file? or by using the pipe are we "guarenteed" that the
streams will reasonably append (and thus not lose any information)?


thanks for any info, imail@xxxxxxxxxx









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