JBoss Community

Re: log4j.xml and logfile name pattern

created by Andre Ehrlich in Beginner's Corner - View the full discussion

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

Start a new discussion in Beginner's Corner at Community