This tutorial describes how to log messages from your plugin.Logging allows you to write information to the Fisheye/Crucible log file when your plugin encounters an error, which will help you diagnose problems with your plugin.
Messages may be written at a level - these message only appear when Debug Logging is turned on on the Admin, Server Settings page. Messages written at , and levels always appear in the log.
You can log anywhere in your plugin code. Just add a snippet of code like this:
1 2 3 4 5 6 7 8 9
... import org.slf4j.Logger; import org.slf4j.LoggerFactory; ... private static final Logger LOG = LoggerFactory.getLogger("atlassian.plugin"); ... LOG.error("Something bad happened"); LOG.debug("Information useful during development"); LOG.info("Information you wish your plugin administrators to view");
The logged output will appear in .