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.
Go to your
JIRA_INSTALL_DIR/atlassian-jira/WEB-INF/classes/log4j.properties
fileAdd 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 # --------------------
Save your changes and restart Jira
Logs can be found in the
JIRA_INSTALL_DIR/home/log
(not to be confused withJIRA_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.
Go to Jira Administration > System > Logging and profiling
Under Default Loggers, select configure logging level for another package
For Package name enter
com.javahollic.jira.emh
For Logging Level select
DEBUG
Press Add to save
JEMH log output will now be added to Jira's own
atlassian-jira.log
file