Mandiax / soi-toolkit

Automatically exported from code.google.com/p/soi-toolkit
0 stars 0 forks source link

log4j configuration - add config for rolling files based on time or date #350

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
The current default log4j.xml uses the RollingFileAppender.

Requirements
=========
For cases where logfiles are to be moved and archived using some script-based 
approach it is hard to know which files to archive when logfiles are being 
re-used as with the RollingFileAppender (that adds suffixes like .1, .2, ... to 
old logfiles and re-uses those logfiles).
It would be much easier to move and archive files if logfiles weren't re-used.
Configuring log4j for this requirement should be easy to do in a consistent way.

Suggested solution
=============
Add a config block in log4j.xml that uses a time-based rolling of logfiles.
Do not make time-based rolling default, but write a note in log4j.xml on how to 
switch appender.

Also: document on wiki, and as a bonus, document on how to configure time-based 
rolling for the Mule-container logfiles (done in conf/wrapper.conf).

http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/DailyRollingFileApp
ender.html

http://logging.apache.org/log4j/companions/extras/

Original issue reported on code.google.com by hakan.d...@gmail.com on 10 Oct 2013 at 1:09

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
JSW ref: 
http://wrapper.tanukisoftware.com/doc/english/prop-logfile-rollmode.html

Original comment by hakan.d...@gmail.com on 10 Oct 2013 at 2:56

GoogleCodeExporter commented 8 years ago

Original comment by hakan.d...@gmail.com on 17 Oct 2013 at 12:32

GoogleCodeExporter commented 8 years ago

Original comment by hakan.d...@gmail.com on 23 Feb 2014 at 3:25