Using JIRA Logging to debug problems
JIRA Mail Protocol Logging
JIRA Logging is accessed through the JIRA Administration screen:
At the bottom of that screen there is a section for Mail, the screenshot below shows the default setting with no logging enabled.
Enabling the Incoming Mail Log will capture email connectivity traffic (protocol chatter and mail retrieval). This logging will end up in JIRA_HOME/log/atlassian-jira-incoming-mail.log
More detail on the Incoming Mail connectivity traffic is possible via Enable Debugging. This logging should not be left on long term.
Protocol Logging will look like:
RESP-CODES
EXPIRE 0
LOGIN-DELAY 300
TOP
UIDL
X-GOOGLE-VERHOEVEN
X-GOOGLE-RICO
.
DEBUG POP3: authentication command trace suppressed
2013-02-22 18:54:16,057 DEBUG [JEMHTesting] QuartzWorker-1 ServiceRunner JEMH Testing pop USER
RESP-CODES
EXPIRE 0
LOGIN-DELAY 300
TOP
UIDL
X-GOOGLE-VERHOEVEN
X-GOOGLE-RICO
.
DEBUG POP3: authentication command trace suppressed
2013-02-22 18:54:16,661 DEBUG [JEMHTesting] QuartzWorker-1 ServiceRunner JEMH Testing pop DEBUG POP3: authentication command succeeded
2013-02-22 18:54:16,662 DEBUG [JEMHTesting] QuartzWorker-1 ServiceRunner JEMH Testing pop Successfully connected to mail store
2013-02-22 18:54:16,662 DEBUG [JEMHTesting] QuartzWorker-1 ServiceRunner JEMH Testing pop Getting folder [INBOX]
2013-02-22 18:54:16,662 DEBUG [JEMHTesting] QuartzWorker-1 ServiceRunner JEMH Testing pop Got folder [INBOX], now opening it for read/write
2013-02-22 18:54:16,662 DEBUG [JEMHTesting] QuartzWorker-1 ServiceRunner JEMH Testing pop C: STAT
2013-02-22 18:54:16,661 DEBUG [JEMHTesting] QuartzWorker-1 ServiceRunner JEMH Testing pop DEBUG POP3: authentication command succeeded
2013-02-22 18:54:16,662 DEBUG [JEMHTesting] QuartzWorker-1 ServiceRunner JEMH Testing pop Successfully connected to mail store
2013-02-22 18:54:16,662 DEBUG [JEMHTesting] QuartzWorker-1 ServiceRunner JEMH Testing pop Getting folder [INBOX]
2013-02-22 18:54:16,662 DEBUG [JEMHTesting] QuartzWorker-1 ServiceRunner JEMH Testing pop Got folder [INBOX], now opening it for read/write
2013-02-22 18:54:16,662 DEBUG [JEMHTesting] QuartzWorker-1 ServiceRunner JEMH Testing pop C: STAT
2013-02-22 18:54:16,780 DEBUG [JEMHTesting] QuartzWorker-1 ServiceRunner JEMH Testing pop S: +OK 0 0
2013-02-22 18:54:16,780 DEBUG [JEMHTesting] QuartzWorker-1 ServiceRunner JEMH Testing pop S: +OK 0 0
2013-02-22 18:54:16,780 DEBUG [JEMHTesting] QuartzWorker-1 ServiceRunner JEMH Testing pop C: NOOP
2013-02-22 18:54:16,780 DEBUG [JEMHTesting] QuartzWorker-1 ServiceRunner JEMH Testing pop C: NOOP
2013-02-22 18:54:16,898 DEBUG [JEMHTesting] QuartzWorker-1 ServiceRunner JEMH Testing pop S: +OK
2013-02-22 18:54:16,898 DEBUG [JEMHTesting] QuartzWorker-1 ServiceRunner JEMH Testing pop JEMH Testing pop[10100]: Found 0 message(s) in the pop3s folder
2013-02-22 18:54:16,898 DEBUG [JEMHTesting] QuartzWorker-1 ServiceRunner JEMH Testing pop S: +OK
2013-02-22 18:54:16,898 DEBUG [JEMHTesting] QuartzWorker-1 ServiceRunner JEMH Testing pop JEMH Testing pop[10100]: Found 0 message(s) in the pop3s folder
2013-02-22 18:54:16,898 DEBUG [JEMHTesting] QuartzWorker-1 ServiceRunner JEMH Testing pop Closing folder
2013-02-22 18:54:16,898 DEBUG [JEMHTesting] QuartzWorker-1 ServiceRunner JEMH Testing pop Closing folder
2013-02-22 18:54:16,898 DEBUG [JEMHTesting] QuartzWorker-1 ServiceRunner JEMH Testing pop C: QUIT
2013-02-22 18:54:16,898 DEBUG [JEMHTesting] QuartzWorker-1 ServiceRunner JEMH Testing pop C: QUIT
2013-02-22 18:54:17,022 DEBUG [JEMHTesting] QuartzWorker-1 ServiceRunner JEMH Testing pop S: +OK Farewell.
2013-02-22 18:54:17,022 DEBUG [JEMHTesting] QuartzWorker-1 ServiceRunner JEMH Testing pop S: +OK Farewell.
2013-02-22 18:54:17,023 DEBUG [JEMHTesting] QuartzWorker-1 ServiceRunner JEMH Testing pop Closing store
2013-02-22 18:54:17,023 DEBUG [JEMHTesting] QuartzWorker-1 ServiceRunner JEMH Testing pop Closing store
JEMH Logging
JEMH logs a lot of content, to view this content, a 'package' needs to be added in the Logging and Profiling section, click configure
Then, add the package com.javahollic.jira.emh at level DEBUG :
After hitting Add, it will be listed, the JEMH logging will now be interwoven with the JIRA_HOME/log/atlassian-jira.log file.
Noisy Environments
If your JIRA is quite busy, and you have other plugins that are contributing to the logfile, it can be difficult to see the JEMH-specific logging. In this situation, a custom logfile needs to be created, please see Enabling JEMH logging (this route requires a JIRA restart, so you'll need to schedule accordingly).