public class Session extends Application { ... ... /** * Gets the database logger. * * @return the logger instance * @throws Exception if an exception occurs during log creation */ public Logger getLogger() throws Exception { Logger log = (Logger)get("logger"); if (log == null) { log = new Logger(getDBAccess()); put("logger", log); } return log; } } // Session