Last updated Dec 8, 2017

Using logging from your Fisheye plugin

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 DEBUG level - these message only appear when Debug Logging is turned on on the Admin, Server Settings page. Messages written at INFO, WARNING and ERROR levels always appear in the log.

You can log anywhere in your plugin code. Just add a snippet of code like this:

1
2
...
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 target/fecru/home/var/log/fisheye-debug.log.YYYY.MM.DD.

Rate this page: