[jboss-user] [Beginner's Corner] - Re: log4j.xml and logfile name pattern

Andre Ehrlich do-not-reply at jboss.com
Mon Sep 27 07:23:29 EDT 2010


Andre Ehrlich [http://community.jboss.org/people/j-n00b] created the discussion

"Re: log4j.xml and logfile name pattern"

To view the discussion, visit: http://community.jboss.org/message/563739#563739

--------------------------------------------------------------
Hi Luk!

Unfortunately, there is no such option in the original log4j class. The reason is the class "org.apache.log4j.DailyRollingfileAppender": it contains the following code:

+scheduledFilename = fileName+sdf.format(new Date(file.lastModified()));+


What you can do is extend the log4j class and change the behaviour of the method. Then you add your jar to JBoss and use your class in the log4j config.


cheers,
Andre
--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/563739#563739]

Start a new discussion in Beginner's Corner at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2075]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20100927/c21e134b/attachment.html 


More information about the jboss-user mailing list