The following describes how to implement logging when adding a class that implements business logic:
private static final Logger logger
= LoggerFactory.getLogger(Adjustment_CHandler.class);
logger.warn("Unexpected status for frozen adjustment: " + status);
if (logger.isDebugEnabled()) {
logger.debug("Processing adjustment " + adjustment.getId());
}
debugStart(message) or infoStart(message)
debugTime(message, start) or infoTime(message, start)
long start = debugStart("Starting process");
//... code for process
debugTime("End process", start);
debugStart was
called.Please refer to the JavaDocs on the com.splwg.shared.logging.Logger class for
more details.