Uploaded image for project: 'Nuxeo Documentation'
  1. Nuxeo Documentation
  2. NXDOC-2099

Review all pages to adapt logging code to log4j2

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Critical
    • Resolution: Unresolved
    • Affects Version/s: 10.10, Fast Track (FT)
    • Fix Version/s: None
    • Component/s: Core Dev Guide (CORG)

      Description

      Since Nuxeo 10.10, Nuxeo has switched to log4j2 which comes with a new format for the logging configuration. The documentation must be modified to follow this change.

      For example https://doc.nuxeo.com/nxdoc/monitoring-slow-nxql-queries/ indicates

      <category name="org.nuxeo.ecm.core.storage.sql.SessionImpl" additivity="false">
          <priority value="INFO" />
          <appender-ref ref="SLOW" />
      </category>
      <appender name="SLOW" class="org.apache.log4j.FileAppender">
          <errorHandler class="org.apache.log4j.helpers.OnlyOnceErrorHandler" />
          <param name="File" value="${nuxeo.log.dir}/slow-query.log" />
          <param name="Append" value="false" />
          <layout class="org.apache.log4j.PatternLayout">
            <param name="ConversionPattern" value="%d{ISO8601} %-5p [%t][%c] %m%X%n" />
          </layout>
      </appender>
      

      which must be replaced by

         <!-- put this inside the <Appenders> paragraph --> 
          <File name="SLOW" fileName="${nuxeo.log.dir}/slow-query.log" append="false">
            <PatternLayout pattern="%d{ISO8601} %-5p [%t] [%c] %m%X%n" />
          </File>
      
         <!-- put this under the Nuxeo loggers part -->
          <Logger name="org.nuxeo.ecm.core.storage.sql.SessionImpl" level="info" additivity="false">
            <AppenderRef ref="SLOW" />
          </Logger>
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                tmartins Thierry Martins
                Participants:
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: