|
From: Joerg T. <Joe...@ma...> - 2007-05-08 06:57:05
|
On 05/07/07 18:08, Richard Pike wrote:
> I wish to change these logs so they roll on a 24 hour basis. Is it
> possible somebody could send me a sample configuration of how to achieve
> this.
See my previous mail how to use SLF4J. If you choose log4j, you can use the
DailyRollingFileAppender. Just edit the log4j.properties found in your CLASSPATH to contain these lines:
log4j.rootCategory=ALL, Default
log4j.appender.Default=org.apache.log4j.DailyRollingFileAppender
log4j.appender.Default.File=<path of your log file>
log4j.appender.Default.DatePattern=-yyyyMMdd
Note that you can use system properties (e.g. user.home) using the syntax ${user.home}.
Check log4j docs for more details.
Regarding JDK 1.4 java.util.logging, check the docs or ask Tommy, he seems to use that.
Cheers, Jörg
--
Joerg Thoennes
http://www.macd.com Tel.: +49 (0)241 44597-24
Macdonald Associates GmbH Geschäftsführer: Roger Macdonald
Lothringer Str. 52, D-52070 Aachen Amtsgericht Aachen, HRB 8151, Ust.-Id DE813021663
|