Uploaded image for project: 'Confluence Cloud'
  1. Confluence Cloud
  2. CONFCLOUD-51824

Add timestamp to synchrony log messages

    XMLWordPrintable

Details

    • Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

    Description

      NOTE: This suggestion is for Confluence Cloud. Using Confluence Server? See the corresponding suggestion.

      Problem Definition

      Timestamp is not a part of the standard synchrony logging yet. Please update message format in log4j properties file so we log the timestamp for messages.

      Suggested Solution

      Add timestamp to Synchrony log file

      Workaround

      You can add the timestamp by following the below steps:

      1. Stop Confluence
      2. Go to <confluence-install>/confluence/WEB-INF/classes/log4j.properties
      3. Look for the section that starts with the below line:
        log4j.appender.synchronylog=com.atlassian.confluence.logging.SynchronyLogAppender
        
      4. In that section, you should have the following line
        log4j.appender.synchronylog.layout.ConversionPattern=%m%n
        
      5. Modify this to become:
        log4j.appender.confluencelog.layout.ConversionPattern=%d %p %M %m%n
        
      6. Start Confluence

      For more info on PatternLayout, please check Log4j Pattern Layout Documentation.

      Log snippet example:

      2017-03-29 11:17:41,479 DEBUG processLine Running QueryDSL sytem...
      2017-03-29 11:17:41,588 DEBUG processLine {"synchrony":{"message":"synchrony.querydsl.jdbc [info] connection pool test-connection-on-checkin: true idle-connection-test-period: 100 max-idle-time-excess-connections: 100 max-idle-time: 3600","ns":"synchrony.querydsl.jdbc","level":"info"},"message":"synchrony.querydsl.jdbc [info] connection pool test-connection-on-checkin: true idle-connection-test-period: 100 max-idle-time-excess-connections: 100 max-idle-time: 3600"}
      2017-03-29 11:17:41,605 DEBUG processLine MLog initialization issue: slf4j found no binding or threatened to use its (dangerously silent) NOPLogger. We consider the slf4j library not found.
      2017-03-29 11:17:41,606 DEBUG processLine MLog clients using log4j logging.
      2017-03-29 11:17:41,631 DEBUG processLine Initializing c3p0-0.9.5.1 [built 16-June-2015 00:06:36 -0700; debug? true; trace: 10]
      2017-03-29 11:18:18,384 DEBUG processLine {"synchrony":{"message":"synchrony.middleware.memoize-response [info] request for static resource","cache-key":["0.0.0.0","/synchrony/resources/js/vendor/sockjs.min.js",null],"ns":"synchrony.middleware.memoize-response","level":"info"},"message":"synchrony.middleware.memoize-response [info] request for static resource"}
      2017-03-29 11:18:18,502 DEBUG processLine {"synchrony":{"message":"synchrony.middleware.memoize-response [info] request for static resource","cache-key":["0.0.0.0","/synchrony/resources/js/synchrony.min.js",null],"ns":"synchrony.middleware.memoize-response","level":"info"},"message":"synchrony.middleware.memoize-response [info] request for static resource"}
      2017-03-29 11:18:18,958 DEBUG processLine Initializing c3p0 pool... com.mchange.v2.c3p0.ComboPooledDataSource [ acquireIncrement -> 3, acquireRetryAttempts -> 30, acquireRetryDelay -> 1000, autoCommitOnClose -> false, automaticTestTable -> null, breakAfterAcquireFailure -> false, checkoutTimeout -> 0, connectionCustomizerClassName -> null, connectionTesterClassName -> com.mchange.v2.c3p0.impl.DefaultConnectionTester, contextClassLoaderSource -> caller, dataSourceName -> 1bqvx939n71a0e010n5igr|47864b2e, debugUnreturnedConnectionStackTraces -> false, description -> null, driverClass -> org.postgresql.Driver, extensions -> {}, factoryClassLocation -> null, forceIgnoreUnresolvedTransactions -> false, forceSynchronousCheckins -> false, forceUseNamedDriverClass -> false, identityToken -> 1bqvx939n71a0e010n5igr|47864b2e, idleConnectionTestPeriod -> 100, initialPoolSize -> 3, jdbcUrl -> jdbc:postgresql://localhost:5432/confluence610, maxAdministrativeTaskTime -> 0, maxConnectionAge -> 0, maxIdleTime -> 3600, maxIdleTimeExcessConnections -> 100, maxPoolSize -> 15, maxStatements -> 0, maxStatementsPerConnection -> 0, minPoolSize -> 3, numHelperThreads -> 3, preferredTestQuery -> null, privilegeSpawnedThreads -> false, properties -> {user=******, password=******}, propertyCycle -> 0, statementCacheNumDeferredCloseThreads -> 0, testConnectionOnCheckin -> true, testConnectionOnCheckout -> false, unreturnedConnectionTimeout -> 0, userOverrides -> {}, usesTraditionalReflectiveProxies -> false ]
      2017-03-29 11:18:19,339 DEBUG processLine {"synchrony":{"message":"synchrony.sync.hub [info] create-entity","event":"entity.created","entity":"/Synchrony-901a371c-caf0-3343-b0be-836ec2606cff/confluence-327699","ns":"synchrony.sync.hub","level":"info"},"message":"synchrony.sync.hub [info] create-entity"}
      2017-03-29 11:18:20,911 DEBUG processLine {"synchrony":{"message":"synchrony.metrics.hub-metrics [info] init-session","source":"O32qVJ5HfgeDrEblwh9zQz4","event":"session.created","modified-content":false,"entity":"/Synchrony-901a371c-caf0-3343-b0be-836ec2606cff/confluence-327699","ns":"synchrony.metrics.hub-metrics","level":"info"},"message":"synchrony.metrics.hub-metrics [info] init-session"}
      2017-03-29 11:18:32,280 DEBUG processLine {"synchrony":{"message":"synchrony.metrics.hub-metrics [info] close-session","source":"O32qVJ5HfgeDrEblwh9zQz4","event":"session.destroyed","modified-content":true,"entity":"/Synchrony-901a371c-caf0-3343-b0be-836ec2606cff/confluence-327699","ns":"synchrony.metrics.hub-metrics","level":"info"},"message":"synchrony.metrics.hub-metrics [info] close-session"}
      

      Attachments

        Issue Links

          Activity

            People

              ukhalid Usman Khalid (Inactive)
              bmcnamara Brendan McNamara
              Votes:
              5 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: