Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-59404

Add thread name to httpaccesslog log4j logger

    XMLWordPrintable

Details

    • 1
    • 4
    • We collect Jira 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.

    Description

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

      Problem Definition

      Currently JIRA HTTP Access Logging doesn't log Java thread name.

      127.0.0.1 i741x66x1 admin [15/Jan/2016:12:21:05 +0100] "GET http://127.0.0.1:8080/secure/admin/ViewLogging.jspa HTTP/1.1" - - - "http://127.0.0.1:8080/secure/admin/ViewLogging.jspa" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:43.0) Gecko/20100101 Firefox/43.0" "uus68a" INFO
      

      This makes troubleshooting of performance problems more complicated, as it hard to get thread from URL and other way around.

      Suggested Solution

      Add Java thread name to log4j.properties:

      log4j.appender.httpaccesslog.layout.ConversionPattern=%m %t%n
      

      Workaround

      Manually modify log4j.properties: :

      -- atlassian-jira-6.4.12-standalone/atlassian-jira/WEB-INF/classes/log4j.properties.orig	2015-08-25 04:26:52.000000000 +0200
      +++ atlassian-jira-6.4.12-standalone/atlassian-jira/WEB-INF/classes/log4j.properties	2016-01-15 12:23:31.000000000 +0100
      @@ -122,7 +122,7 @@
       log4j.appender.httpaccesslog.MaxFileSize=20480KB
       log4j.appender.httpaccesslog.MaxBackupIndex=5
       log4j.appender.httpaccesslog.layout=org.apache.log4j.PatternLayout
      -log4j.appender.httpaccesslog.layout.ConversionPattern=%m%n
      +log4j.appender.httpaccesslog.layout.ConversionPattern=%m %t%n
      
       log4j.appender.httpdumplog=com.atlassian.jira.logging.JiraHomeAppender
       log4j.appender.httpdumplog.File=atlassian-jira-http-dump.log
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              ayakovlev@atlassian.com Andriy Yakovlev [Atlassian]
              Votes:
              5 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated: