I found this post while looking for a solution for this problem:
   
http://stackoverflow.com/questions/20819376/log4j2-rollingfile-appender-add-custom-info-at-the-start-of-each-logfile

So, Ralph's statement makes me hope:
> You can already extend this class and override that method to perform work
> before or after doing super.rollover(fileManager).

Ok, extending DefaultRolloverStrategy is looks easy, like this dummy try:



But I stuck at two things:
- how to force the RollingFileAppender to use MyRolloverStrategy instead of
DefaultRolloverStrategy (seems that I have to deal with @Plugin and
@PluginFactory)?
- how to write to the logfiles within my rollover method?

Could you help me at this point?
I would be happy to get some sample source snippets.

Cheers, Joe




--
View this message in context: 
http://apache-logging.6191.n7.nabble.com/log4j2-getting-started-rolling-files-tp8406p42402.html
Sent from the Log4j - Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to