logo       

Re: Logging Enhydra user access/statistics: msg#00029

java.enhydra.general

Subject: Re: Logging Enhydra user access/statistics

Darius Katz wrote:

Hi!

Is there a way to automatically split up the Enhydra user
access/statistics logging, i.e. every week or every month in order to
avoid HUGE log-files?

I have turned on the logging in the multiserver.conf file like this:

Channel.httpport.aChan.Filters[] = StandardLogger
Filter.StandardLogger.ClassName =
org.enhydra.servlet.filter.StandardLoggingFilter
Filter.StandardLogger.Description = "Standard Enhydra Logging."
Filter.StandardLogger.InitArgs.logFile = /logs/Enhydra/myaccess.log


Is there an InitArgs argument I can use for automagically splitting up
the log-file?

AFAIK, this is not possible. If you can, wait for Enhydra 5.1 and the log4j integration : log4j is much more powerful than the StandardLogger...
If you can't wait, don't log to a file, but to StdErr, and pipe the output of Enhydra either to syslog with logger (if you're under unix), or through a script/program like rotatelogs, distributed with apache. It handles nicely the job of rotating the logs for you :

$ /usr/sbin/rotatelogs --help
Usage: /usr/sbin/rotatelogs <logfile> <rotation time in seconds> [offset minutes from UTC]

Add this:

TransferLog "|/usr/sbin/rotatelogs /some/where 86400"

to httpd.conf. The generated name will be /some/where.nnnn where nnnn is the
system time at which the log nominally starts (N.B. this time will always be a
multiple of the rotation time, so you can synchronize cron scripts with it).
At the end of each rotation time a new log is started.


Thanks for your help!

-- Darius
_______________________________________________
Enhydra mailing list
Enhydra@xxxxxxxxxxx
http://www.enhydra.org/mailman/listinfo.cgi/enhydra




--
Frederic Garzon <Frederic.Garzon@xxxxxxxx>
---------------------------------------------
o 51, rue de Verdun
/ _ __ _ 92158 Suresnes cedex
/ /\ /_ / /_ France
\/ \/_ / /_/ Tel. +33 (0) 1 41 44 85 45
Inetsys S.A. Fax +33 (0) 1 46 97 20 10


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise