Enabling JEMH logging

Sometimes you may want more information about the processing of an email than you get from the Auditing report. Additional information can be configured to be logged out to a file. There are 2 methods for enabling logging:

Output to a dedicated log file

recommended restart required

With the following configuration, Jira will create a jemh.log file in JIRA_HOME/log.  A Jira restart will be required to make the changes apply.

  1. Go to your JIRA_INSTALL_DIR/atlassian-jira/WEB-INF/classes/log4j.properties file

  2. Add the following lines to the bottom of the file:

    1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 # --------------------- # JEMH LOGGING STARTS log4j.appender.JEMHFileLog=com.atlassian.jira.logging.JiraHomeAppender log4j.appender.JEMHFileLog.File=jemh.log log4j.appender.JEMHFileLog.MaxFileSize=20480KB log4j.appender.JEMHFileLog.MaxBackupIndex=5 log4j.appender.JEMHFileLog.layout=org.apache.log4j.PatternLayout log4j.appender.JEMHFileLog.layout.ConversionPattern=%d %t %p [%c{4}] %m%n log4j.appender.JEMHFileLog.Threshold=DEBUG log4j.logger.com.javahollic.jira.emh=DEBUG, JEMHFileLog log4j.additivity.com.javahollic.jira.emh=false log4j.logger.com.thepluginpeople.jemh.transport=DEBUG, JEMHFileLog log4j.additivity.com.thepluginpeople.jemh.transport=false # JEMH LOGGING ENDS # --------------------
  3. Save your changes and restart Jira

  4. Logs can be found in the JIRA_INSTALL_DIR/home/log (not to be confused with JIRA_INSTALL_DIR/logs)

Changing the amount of data logged

The steps above set logging to the default level (DEBUG). This means that all extra information will be saved to the log file. To reduce the amount of logging, the level can be changed. Changing the level requires a Jira restart. The following levels can be set:

  • DEBUG (most information)

  • INFO

  • WARN

  • ERROR (least information)

Using Jira 5?

Jira 5 needs the first line to be: log4j.appender.JEMHFileLog=com.atlassian.jira.logging.MultiTenantJiraHomeAppender

Output to the existing Atlassian log file

no restart required

Whilst we recommend the first method as it outputs to a separate log file, if restarting Jira is not an option it can still be enabled temporarily.

  1. Go to Jira Administration > System > Logging and profiling

  2. Under Default Loggers, select configure logging level for another package

  3. For Package name enter com.javahollic.jira.emh

  4. For Logging Level select DEBUG

  5. Press Add to save

  6. JEMH log output will now be added to Jira's own atlassian-jira.log file