Uploaded image for project: 'Service Packs and Hot Fixes'
  1. Service Packs and Hot Fixes
  2. MNT-14139

Custom log4j.properties for Share in web_extension should accept properties

    Details

    • Bug Priority:
      Category 3
    • ACT Numbers:

      00410935

      Description

      Please have a look at https://issues.alfresco.com/jira/browse/MNT-14044 for reference. Adding a separate datetime format for a custom log4j.properties than what is used for the standard logging (log4j.properties in tomcat/webapps/alfresco/WEB-INF/classes) works if you set the root logger:

      log4j.rootLogger=error, Console, File

      However, this doesn't work for any customized log4j.properties for the Share application.

      Steps to replicate:

      1. Create a file called custom-log4j.properties
      2. Place the following at the top of the file:

      log4j.rootLogger=error, Console, File

      1. All outputs currently set to be a ConsoleAppender.
        log4j.appender.Console=org.apache.log4j.ConsoleAppender
        log4j.appender.Console.layout=org.apache.log4j.PatternLayout
      1. use log4j NDC to replace %x with tenant domain / username
        log4j.appender.Console.layout.ConversionPattern=%d {ISO8601} %x %-5p [%c{3}] [%t] %m%n
        log4j.appender.Console.layout=org.apache.log4j.PatternLayout
        log4j.appender.Console.layout.ConversionPattern=%d{ABSOLUTE} %-5p [%c] [%t] %m%n

        #log4j.appender.Console.layout.ConversionPattern=%d{ABSOLUTE} %-5p [%c] %m%n

        ###### File appender definition #######
        log4j.appender.File=org.apache.log4j.DailyRollingFileAppender
        log4j.appender.File.File=alfresco.log
        log4j.appender.File.Append=true
        log4j.appender.File.DatePattern='.'yyyy-MM-dd
        log4j.appender.File.layout=org.apache.log4j.PatternLayout
        log4j.appender.File.layout.ConversionPattern=%d{ISO8601}

        %-5p [%c] %m%n

      log4j.logger.org.alfresco.util.exec.RuntimeExec=DEBUG

      3. Restart Alfresco

      4. If you look in the alfresco.log file during startup you will see the date/time format as such:

      2015-06-02 10:27:06,204 INFO ...

      5. Stop Alfresco

      6. Create a custom-log4j.properties file under web_extension directory.

      7. Add the same lines as in Step #2 above.

      Observed:

      If you look in the share.log file after startup, the date/time format still has the standard:

      10:28:08,611 INFO ...

      Expected:

      Like you can with a custom log4j format with Alfresco, you should be able to do the same for Share.

        Attachments

          Structure

            Activity

              People

              • Assignee:
                uiteam Web Apps (Inactive)
                Reporter:
                hseritt Harlin Seritt
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Structure Helper Panel