This page last changed on Oct 31, 2007 by rosie@atlassian.com.


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

No content found for label(s) logging.
Document generated by Confluence on Oct 06, 2009 00:26