/** * Log a message on the Logger associated with our Container (if any). * * @param message Message to be logged * @param throwable Associated exception */ protected void log(String message, Throwable throwable) { Logger logger = null; if (container != null) logger = container.getLogger(); if (logger != null) logger.log("StandardPipeline[" + container.getName() + "]: " + message, throwable); else { System.out.println("StandardPipeline[" + container.getName() + "]: " + message); throwable.printStackTrace(System.out); } }
/** * Log a message on the Logger associated with our Container (if any) * * @param message Message to be logged * @param throwable Associated exception */ protected void log(String message, Throwable throwable) { Logger logger = null; String name = null; if (container != null) { logger = container.getLogger(); name = container.getName(); } if (logger != null) { logger.log(getName() + "[" + name + "]: " + message, throwable); } else { System.out.println(getName() + "[" + name + "]: " + message); throwable.printStackTrace(System.out); } }