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

ConversionPattern doesn't always get overridden by log4j.properties in the extension dir.

    Details

    • Type: Service Pack Request
    • Status: Closed (View Workflow)
    • Priority: Critical
    • Resolution: Not a bug
    • Affects Version/s: 3.4.8
    • Fix Version/s: 3.4.11
    • Component/s: Repository
    • Labels:
      None
    • ACT Numbers:

      40892

      Description

      If you have 4 different log4j files, each with a different ConversionPattern, it looks like that the choice of which definition to use is not consistent.

      [ Steps to reproduce]

      1. Modify the pattern layout for File Appender in

      {configRoot}/log4j.properties :
      log4j.appender.File.layout.ConversionPattern=ALFRESCO %d %-5p [%c] %m%n

      2. Copy {configRoot}

      /log4j.properties to

      {extensionRoot}/alfresco/extension/alfresco-extension-log4j.properties

      3. Modify the pattern layout for File Appender in alfresco-extension-log4j.properties
      log4j.appender.File.layout.ConversionPattern=ALFRESCO EXTENSION %d %-5p [%c] %m%n

      4. Modify the pattern layout for File Appender in tomcat/webapps/share/WEB-INF/classes/log4j.properties
      log4j.appender.File.layout.ConversionPattern=SHARE %d %-5p [%c] %m%n

      5. Copy tomcat/webapps/share/WEB-INF/classes/log4j.properties to {extensionRoot}

      /alfresco/extension/share-extension-log4j.properties

      6. Modify the pattern layout for File Appender in share-extension-log4j.properties
      log4j.appender.File.layout.ConversionPattern=SHARE EXTENSION %d %-5p [%c] %m%n

      7. Turn on debugging for Forms Engine in both share-extension-log4j.properties and tomcat/webapps/share/WEB-INF/classes/log4j.properties
      log4j.logger.org.alfresco.repo.forms=debug
      log4j.logger.org.alfresco.web.config.forms=debug
      log4j.logger.org.alfresco.web.scripts.forms=debug

      8. Restart Alfresco

      9. Login into Share

      10. Go to Repository, and click 'New Folder' button.

      [ Actual Result]
      Sometimes the ConversionPattern from the log4j file within the webapp is used, and sometimes the one within the extension folder (See alfresco.log)
      Examples:

      SHARE EXTENSION 2012-04-18 11:04:58,052 DEBUG [org.alfresco.repo.forms.processor.FilteredFormProcessor] Set filter registry: org.alfresco.repo.forms.processor.FilterRegistry@6b38c54e for processor: org.alfresco.repo.forms.processor.node.NodeFormProcessor@5c21bae0 (active=true, matchPattern=null)
      SHARE EXTENSION 2012-04-18 11:04:58,056 DEBUG [org.alfresco.repo.forms.processor.FormProcessorRegistry] Registered processor: org.alfresco.repo.forms.processor.node.NodeFormProcessor@5c21bae0 (active=true, matchPattern=node)
      ...
      SHARE 2012-04-18 11:07:04,627 DEBUG [org.alfresco.web.scripts.forms.FormUIGet] itemKind = type
      SHARE 2012-04-18 11:07:04,627 DEBUG [org.alfresco.web.scripts.forms.FormUIGet] itemId = cm:folder

      [ Expected Result]
      The log4j.properties within the extension folder should override the other ones

        Attachments

          Activity

            People

            • Assignee:
              closedissues Closed Issues
              Reporter:
              mmancuso Marco Mancuso
            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 4 days, 6 hours
                4d 6h