开发者

What is the difference between log4j RollingFileAppender vs DailyRollingFileAppender

What is the difference between log4j RollingFileAppender vs DailyRollingFileAppender? And why would 开发者_如何学运维I use one versus the other?


Reading http://www.mail-archive.com/log4j-user@logging.apache.org/msg08183.html

  • DailyRollingFileAppender - Rotates based on dateFormat
  • RollingFileAppender - Rotates based on a maximum file size.

Also check:

http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/RollingFileAppender.html

http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/DailyRollingFileAppender.html


On DailyRollingFileAppender the file is rolled over at a user chosen frequency, but on RollingFileAppender the file is rolled when the file reaches certain size.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜