/** * Log a message object at the ERROR level. * * @param msg * - the message object to be logged */ @Override public void error(String msg) { this.logger.error(null, getClass(), msg); }
/** * Log an exception (throwable) at the ERROR level with an accompanying * message. * * @param msg * the message accompanying the exception * @param t * the exception (throwable) to log */ @Override public void error(String msg, Throwable t) { this.logger.error(null, getClass(), msg, t); }
/** * Logs an error with fatal log level. * * @param message log this message * @param t log this cause */ @Override public final void fatal(final Object msg, final Throwable t) { String sMsg = msg == null ? "FATAL???" : msg.toString(); this.logger.error(null, getClass(), sMsg, t); }
/** * Logs a message with error log level. * * @param message log this message */ @Override public final void error(final Object msg) { String sMsg = msg == null ? "???" : msg.toString(); this.logger.error(null, getClass(), sMsg); }
/** * Logs an error with error log level. * * @param message log this message * @param t log this cause */ @Override public final void error(final Object msg, final Throwable t) { String sMsg = msg == null ? "???" : msg.toString(); this.logger.error(null, getClass(), sMsg, t); }
/** * Logs a message with fatal log level. * * @param message log this message */ @Override public final void fatal(final Object msg) { String sMsg = msg == null ? "FATAL???" : msg.toString(); this.logger.error(null, getClass(), sMsg); }
/** * <p>Default initializer that load message bundle by default locale.</p> **/ public final void initDefault() { try { this.messages = null; this.messages = ResourceBundle.getBundle("Messages"); } catch (Exception e) { this.logger.error(null, SrvI18n.class, " when loading msgs for default locale ", e); } if (messages != null) { this.messagesMap.put(Locale.getDefault().getLanguage(), this.messages); this.logger.info(null, SrvI18n.class, "Added messages for default locale: " + Locale.getDefault()); } else { //If there is no MessagesBundle[current-locale].properties this.logger.error(null, SrvI18n.class, "There is no messages for current locale: " + Locale.getDefault()); } }
/** * Log a message at the ERROR level according to the specified format and * argument. * * <p> * This form avoids superfluous object creation when the logger is disabled * for the ERROR level. * </p> * * @param format * the format string * @param arg * the argument */ @Override public void error(String format, Object arg) { FormattingTuple ft = MessageFormatter.arrayFormat(format, new Object[] {arg}); this.logger.error(null, getClass(), ft.getMessage(), ft.getThrowable()); }
/** * Log a message at level ERROR according to the specified format and * arguments. * * <p> * This form avoids superfluous object creation when the logger is disabled * for the ERROR level. * </p> * * @param format * the format string * @param argArray * an array of arguments */ @Override public void error(String format, Object... argArray) { FormattingTuple ft = MessageFormatter.arrayFormat(format, argArray); this.logger.error(null, getClass(), ft.getMessage(), ft.getThrowable()); }
/** * Log a message at the ERROR level according to the specified format and * arguments. * * <p> * This form avoids superfluous object creation when the logger is disabled * for the ERROR level. * </p> * * @param format * the format string * @param arg1 * the first argument * @param arg2 * the second argument */ @Override public void error(String format, Object arg1, Object arg2) { FormattingTuple ft = MessageFormatter.arrayFormat(format, new Object[] {arg1, arg2}); this.logger.error(null, getClass(), ft.getMessage(), ft.getThrowable()); }
@Override public final void init() throws ServletException { try { this.factoryAppBeans = (IFactoryAppBeans) getServletContext() .getAttribute("IFactoryAppBeans"); } catch (Exception e) { if (this.factoryAppBeans != null) { ILogger logger = null; try { logger = (ILogger) this.factoryAppBeans.lazyGet("ILogger"); } catch (Exception e1) { e1.printStackTrace(); } if (logger != null) { logger.error(null, getClass(), "INIT", e); } } throw new ServletException(e); } }
@Override public final void init() throws ServletException { try { this.factoryAppBeans = (IFactoryAppBeans) getServletContext() .getAttribute("IFactoryAppBeans"); } catch (Exception e) { if (this.factoryAppBeans != null) { ILogger logger = null; try { logger = (ILogger) this.factoryAppBeans.lazyGet("ILogger"); } catch (Exception e1) { e1.printStackTrace(); } if (logger != null) { logger.error(null, getClass(), "INIT", e); } } throw new ServletException(e); } }
@Override public final void init() throws ServletException { this.dirJsp = getInitParameter("dirJsp"); try { this.factoryAppBeans = (IFactoryAppBeans) getServletContext() .getAttribute("IFactoryAppBeans"); } catch (Exception e) { if (this.factoryAppBeans != null) { ILogger logger = null; try { logger = (ILogger) this.factoryAppBeans.lazyGet("ILogger"); } catch (Exception e1) { e1.printStackTrace(); } if (logger != null) { logger.error(null, getClass(), "INIT", e); } } throw new ServletException(e); } }
@Override public final void init() throws ServletException { this.dirJsp = getInitParameter("dirJsp"); try { factoryAppBeans = (IFactoryAppBeans) getServletContext() .getAttribute("IFactoryAppBeans"); } catch (Exception e) { if (this.factoryAppBeans != null) { ILogger logger = null; try { logger = (ILogger) this.factoryAppBeans.lazyGet("ILogger"); } catch (Exception e1) { e1.printStackTrace(); } if (logger != null) { logger.error(null, getClass(), "INIT", e); } } throw new ServletException(e); } }
@Override public final void init() throws ServletException { this.dirJsp = getInitParameter("dirJsp"); try { factoryAppBeans = (IFactoryAppBeans) getServletContext() .getAttribute("IFactoryAppBeans"); } catch (Exception e) { if (this.factoryAppBeans != null) { ILogger logger = null; try { logger = (ILogger) this.factoryAppBeans.lazyGet("ILogger"); } catch (Exception e1) { e1.printStackTrace(); } if (logger != null) { logger.error(null, getClass(), "INIT", e); } } throw new ServletException(e); } }
@Override public final void init() throws ServletException { this.dirJsp = getInitParameter("dirJsp"); try { this.factoryAppBeans = (IFactoryAppBeans) getServletContext() .getAttribute("IFactoryAppBeans"); } catch (Exception e) { if (this.factoryAppBeans != null) { ILogger logger = null; try { logger = (ILogger) this.factoryAppBeans.lazyGet("ILogger"); } catch (Exception e1) { e1.printStackTrace(); } if (logger != null) { logger.error(null, getClass(), "INIT", e); } } throw new ServletException(e); } }
@Override public final void init() throws ServletException { this.dirJsp = getInitParameter("dirJsp"); try { this.factoryAppBeans = (IFactoryAppBeans) getServletContext() .getAttribute("IFactoryAppBeans"); } catch (Exception e) { if (this.factoryAppBeans != null) { ILogger logger = null; try { logger = (ILogger) this.factoryAppBeans.lazyGet("ILogger"); } catch (Exception e1) { e1.printStackTrace(); } if (logger != null) { logger.error(null, getClass(), "INIT", e); } } throw new ServletException(e); } }
@Override public final void init() throws ServletException { this.dirJsp = getInitParameter("dirJsp"); try { factoryAppBeans = (IFactoryAppBeans) getServletContext() .getAttribute("IFactoryAppBeans"); } catch (Exception e) { if (this.factoryAppBeans != null) { ILogger logger = null; try { logger = (ILogger) this.factoryAppBeans.lazyGet("ILogger"); } catch (Exception e1) { e1.printStackTrace(); } if (logger != null) { logger.error(null, getClass(), "INIT", e); } } throw new ServletException(e); } }
@Override public final void init() throws ServletException { this.dirJsp = getInitParameter("dirJsp"); try { this.factoryAppBeans = (IFactoryAppBeans) getServletContext() .getAttribute("IFactoryAppBeans"); } catch (Exception e) { if (this.factoryAppBeans != null) { ILogger logger = null; try { logger = (ILogger) this.factoryAppBeans.lazyGet("ILogger"); } catch (Exception e1) { e1.printStackTrace(); } if (logger != null) { logger.error(null, getClass(), "INIT", e); } } throw new ServletException(e); } }
@Override public final void init() throws ServletException { this.dirJsp = getInitParameter("dirJsp"); try { factoryAppBeans = (IFactoryAppBeans) getServletContext() .getAttribute("IFactoryAppBeans"); } catch (Exception e) { if (this.factoryAppBeans != null) { ILogger logger = null; try { logger = (ILogger) this.factoryAppBeans.lazyGet("ILogger"); } catch (Exception e1) { e1.printStackTrace(); } if (logger != null) { logger.error(null, getClass(), "INIT", e); } } throw new ServletException(e); } }