Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

log4j combination

 
Chen Yanush
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
For my application I am using the DailyRollingFileAppender. Is there a way to add maxFileSize parameter of RollingFileAppender?
Maybe there is a plug-in for this kind of combination?

Thanks

 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You would need to write your own subclass. As it is, you can either roll over on reaching the maximum file size, or on reaching a certain point in time (e.g. midnight), but not both. If you want to combine them, you'd also need to come up with a new file naming scheme.
 
Chen Yanush
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks ...
 
Chen Yanush
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How can I add a new appender to the project ?
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you mean how to write a new one, or how to contribute one you're written back to the project? If the former, use RollingFileAppender.java or DailyRollingFileAppender.java as an example; maybe you can even extend one of them. If the latter, post a message to the log4j developer mailing list, and they'll let you know how to proceed.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic