This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

log4j problem: Multiple RollingFileAppender in an application

 
Ankit Garg
Sheriff
Posts: 9497
22
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys,

I'm using three log4j RollingFileAppenders in my application and only the one which I declare last works others don't roll the file. Has anyone faced the same issue? If this is a known problem then is there a solution (there are no matching hits on google). Here's my log4j.xml (I've changed some of the names as per my company's NDA)
 
Tim Holloway
Saloon Keeper
Pie
Posts: 17624
39
Android Eclipse IDE Linux
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Presumably you're rolling based on filesize, since you don't have a time-based policy in effect. So of course, if the logs stay under the threshold, they won't roll even if everything else is perfect.

Here's one of about 7 appenders I have in one app:

 
Ankit Garg
Sheriff
Posts: 9497
22
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry I messed up with my words. The file actually rolls after the 20MB limit but the old logs don't get stored in a different file name i.e. the backup is not working...
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic