What is the difference between log4j RollingFileAppender vs DailyRollingFileAppender

后端 未结 2 1001

What is the difference between log4j RollingFileAppender vs DailyRollingFileAppender? and why would I use one verses the other?

相关标签:
2条回答
  • 2021-01-04 09:30

    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 讨论(0)
  • 2021-01-04 09:42

    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

    0 讨论(0)
提交回复
热议问题