Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Logging using Log4j  RSS feed

 
anuja Edathu
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using Log4j for logging . How can i limit the number of back ups when iam using DailyRollingFileAppender.


Though here I tried to limit the number of back ups , it does not seem to work . Can any body tell me what can i do about this ?

Thanks & Regar
 
Joe Ess
Bartender
Posts: 9406
12
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You must be confusing DailyRollingFileAppender with RollingFileAppender. DailyRollingFileAppender does not have a property for maxBackupIndex.
 
Carol Enderlin
drifter
Ranch Hand
Posts: 1364
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is common to set up a cron job on unix to remove old log files.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!