You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by c0de_ek0 <fa...@gmail.com> on 2010/02/11 16:08:47 UTC

Adding a Header to Log4j with DailyRollingAppender

Good Morning,
We would like to add a disclaimer header to a daily generated log4j log
file. Is there a way to do that thought the log4j properties file only, thus
without code changes and extending org.apache.log4j.PatternLayout ?


-- 
View this message in context: http://old.nabble.com/Adding-a-Header-to-Log4j-with-DailyRollingAppender-tp27547037p27547037.html
Sent from the Log4j - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Re: Adding a Header to Log4j with DailyRollingAppender

Posted by Simon Park <si...@yahoo.co.uk>.
The TimeAndSizeRollingAppender behaves very similarly to the DailyRollingAppender and makes it easy to do just what you need by configuring the FileRollEventMessage property.  The caveat is that its not part of the main Log4J code.  See my site at http://www.simonsite.org.uk for Javadocs and download links.

HTH,

Simon




________________________________
From: c0de_ek0 <fa...@gmail.com>
To: log4j-user@logging.apache.org
Sent: Thu, 11 February, 2010 15:08:47
Subject: Adding a Header to Log4j with DailyRollingAppender


Good Morning,
We would like to add a disclaimer header to a daily generated log4j log
file. Is there a way to do that thought the log4j properties file only, thus
without code changes and extending org.apache.log4j.PatternLayout ?


-- 
View this message in context: http://old.nabble.com/Adding-a-Header-to-Log4j-with-DailyRollingAppender-tp27547037p27547037.html
Sent from the Log4j - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org