Changing JIRA's log output

JIRA Documentation

Index


A common task when identifying JIRA problems is to turn up the log level, to get more debug-level logs. For short-term logging, this can be done in Administration -> Logging and Profiling, but this won't persist across JIRA restarts. To set the log level more permanently, do as follows:

In JIRA Standalone

  1. Edit atlassian-jira/WEB-INF/classes/log4j.properties
  2. In 3.7 and above: locate the section:
    log4j.category.com.atlassian = WARN, console, filelog
    log4j.additivity.com.atlassian = false
    

    and change the WARN to DEBUG.
    In 3.6.5 and earlier: locate the section:

    #####################################################
    # CLASS-SPECIFIC LOGGING LEVELS
    #####################################################
    # This stuff you may wish to debug, but it produces a high volume of logs.
    # Uncomment only if you want to debug something particular
    

    and below it, add the section:

    log4j.category.com.atlassian = DEBUG, console, filelog
    log4j.additivity.com.atlassian = false
    
  3. Restart JIRA Standalone by running the shutdown and startup scripts.

JIRA deployed as a Webapp

In the Webapp/WAR distribution (used to build a webapp for deployment):

  1. copy webapp/WEB-INF/classes/log4j.properties to edit-webapp/WEB-INF/classes/log4j.properties
  2. edit edit-webapp/WEB-INF/classes/log4j.properties, making the same changes as above, so in the end you have:
    log4j.category.com.atlassian = DEBUG, console, filelog
    log4j.additivity.com.atlassian = false
    
  3. Run build.sh or build.bat to rebuild the webapp
  4. Redeploy the new webapp in your app server.

Background

JIRA's logging output is classified by importance, with the levels being:

  • DEBUG: low-level details most people never need to know about.
  • INFO: Informational messages on what JIRA is doing. Usually not interesting.
  • WARN: Warnings that something may have gone wrong, or other messages a sysadmin may wish to know.
  • ERROR: Something went wrong in JIRA. The person responsible for configuring JIRA should be notified

The default level is WARN, meaning warnings and errors are displayed. Sometimes it is useful to adjust this level to see more details.

Alternatively you can turn up logging for just one section. For instance, to see user authentication logs, locate the lines:

log4j.category.com.opensymphony = WARN, console
log4j.additivity.com.opensymphony = false

and change WARN to DEBUG.

Once the app server is restarted, you should see significantly more logs being generated.

Related pages

Changing JIRA's log output (JIRA) — A common task when identifying JIRA problems is to turn up the log level, to get more debug-level logs.
Logging email protocol details (JIRA) — How to enable email protocol (SMTP, IMAP, POP) logging in JIRA
User access logging (JIRA) — How to track user actions with page access logging
Where are the JIRA logs? (JIRA) — A decision tree for finding JIRA logs on your system

Labels

 
  1. Aug 03, 2004

    Matafleur Flamestrike says:

    maybe it is better to use log4j with PropertyConfigurator.configureAndWatch meth...

    maybe it is better to use log4j with PropertyConfigurator.configureAndWatch method..
    this will prevent us from stopping and starting jira in order to make the changes effect.