• Icon: Suggestion Suggestion
    • Resolution: Won't Fix
    • None
    • None
    • We collect Confluence feedback from various sources, and we evaluate what we've collected when planning our product roadmap. To understand how this piece of feedback will be reviewed, see our Implementation of New Features Policy.

      Some admin might prefer time based log file rotation and regards this to be more sensible.

      Richard pointed out that we may be able to utilize http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/DailyRollingFileAppender.html to achieve this, but utilising that directly doesn't include log messages captured prior to Confluence being fully started.

      That is, please make ConfluenceHomeLogAppender to include the functionality from DailyRollingFileAppender

            [CONFSERVER-22787] Allow atlassian-confluence.log to be rotated daily

            David, we haven't seen any problems using the DailyRollingFileAppender with Confluence.

            If you have experienced some problems with log rotation, please open a new issue with the details.

            Matt Ryall added a comment - David, we haven't seen any problems using the DailyRollingFileAppender with Confluence. If you have experienced some problems with log rotation, please open a new issue with the details.

            David Feig added a comment - - edited

            I think this should be re-opened. The recommended workaround is now broken. The DailyRollingFileAppender docs states it has data loss and syncronization issues and recommend using The log4j extras companion. The extras might also require the installation of a new jar, I'm not sure.

            David Feig added a comment - - edited I think this should be re-opened. The recommended workaround is now broken. The DailyRollingFileAppender docs states it has data loss and syncronization issues and recommend using The log4j extras companion. The extras might also require the installation of a new jar, I'm not sure.

            Sample modification in log4j.properties to achieve this:

            ###
            #log4j.appender.confluencelog=com.atlassian.confluence.logging.ConfluenceHomeLogAppender
            #log4j.appender.confluencelog.Threshold=DEBUG
            # Comment the above line and uncomment the following 2 lines if you want to log to a specific location
            log4j.appender.confluencelog=org.apache.log4j.DailyRollingFileAppender
            log4j.appender.confluencelog.DatePattern='.'yyyy-MM-dd
            log4j.appender.confluencelog.layout=com.atlassian.confluence.util.PatternLayoutWithContext
            log4j.appender.confluencelog.layout.ConversionPattern=%d %p [%t] [%c{4}] %M %m%n
            

            A restart is required.

            The date pattern can be observed from http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/DailyRollingFileAppender.html

            By enabling the above, log messages prior to Confluence being fully started won't be captured.

            Roy Hartono [Atlassian] added a comment - Sample modification in log4j.properties to achieve this: ### #log4j.appender.confluencelog=com.atlassian.confluence.logging.ConfluenceHomeLogAppender #log4j.appender.confluencelog.Threshold=DEBUG # Comment the above line and uncomment the following 2 lines if you want to log to a specific location log4j.appender.confluencelog=org.apache.log4j.DailyRollingFileAppender log4j.appender.confluencelog.DatePattern= '.' yyyy-MM-dd log4j.appender.confluencelog.layout=com.atlassian.confluence.util.PatternLayoutWithContext log4j.appender.confluencelog.layout.ConversionPattern=%d %p [%t] [%c{4}] %M %m%n A restart is required. The date pattern can be observed from http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/DailyRollingFileAppender.html By enabling the above, log messages prior to Confluence being fully started won't be captured.

            Matt Ryall added a comment -

            Customers who are interested in this should look into the documentation mentioned. You can configure this through Confluence's WEB-INF/classes/log4j.properties file.

            We don't have any plans to change the default behaviour at the moment of size-based rotation.

            Matt Ryall added a comment - Customers who are interested in this should look into the documentation mentioned. You can configure this through Confluence's WEB-INF/classes/log4j.properties file. We don't have any plans to change the default behaviour at the moment of size-based rotation.

              matt@atlassian.com Matt Ryall
              rhartono Roy Hartono [Atlassian]
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: