• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

log4j Question

 
Ranch Hand
Posts: 150
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Currently, i am using log4j in my application for logging purpose. I make use of DailyRollingFileAppender with the file rolling twice each day (AM/PM). This creates as much as 60 different log files each month (2 * 30 days) - i want this to be limited to 10 log files. Is there anyway, this can be done ? I also want to preserve the properties of the DailyRollingFileAppender - use different file names for AM and PM.

Appreciate any help in this regard.
 
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
A weekly roll over is possible with this config option,

'.'yyyy-ww


For more details, you may want to look at the DailyRollingFileAppender documentation. I'd like to think that there would be an option available somewhere, may not be a straight forward one to your exact requirement.

Good Luck,
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic