/** * Log a message at level WARN according to the specified format and * arguments. * * <p> * This form avoids superfluous object creation when the logger is disabled * for the WARN level. * </p> * * @param format * the format string * @param argArray * an array of arguments */ @Override public void warn(String format, Object... argArray) { if (logger.isEnabledFor(Level.WARN)) { FormattingTuple ft = MessageFormatter.arrayFormat(format, argArray); logger.log(FQCN, Level.WARN, ft.getMessage(), ft.getThrowable()); } }
/** * Log a message at level DEBUG according to the specified format and * arguments. * * <p> * This form avoids superfluous object creation when the logger is disabled * for the DEBUG level. * </p> * * @param format * the format string * @param arguments an array of arguments */ @Override public void debug(String format, Object... arguments) { if (logger.isDebugEnabled()) { FormattingTuple ft = MessageFormatter.arrayFormat(format, arguments); logger.log(FQCN, Level.DEBUG, ft.getMessage(), ft.getThrowable()); } }
/** * Log a message at level WARN according to the specified format and * arguments. * * <p> * This form avoids superfluous object creation when the logger is disabled * for the WARN level. * </p> * * @param format * the format string * @param argArray * an array of arguments */ public void warn(String format, Object... argArray) { if (logger.isEnabledFor(Level.WARN)) { FormattingTuple ft = MessageFormatter.arrayFormat(format, argArray); logger.log(FQCN, Level.WARN, 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 */ public void error(String format, Object... argArray) { if (logger.isEnabledFor(Level.ERROR)) { FormattingTuple ft = MessageFormatter.arrayFormat(format, argArray); logger.log(FQCN, Level.ERROR, ft.getMessage(), ft.getThrowable()); } }
/** * Log a message at the WARN level according to the specified format and * argument. * * <p> * This form avoids superfluous object creation when the logger is disabled * for the WARN level. * </p> * * @param format * the format string * @param arg * the argument */ @Override public void warn(String format, Object arg) { if (logger.isEnabledFor(Level.WARN)) { FormattingTuple ft = MessageFormatter.format(format, arg); logger.log(FQCN, Level.WARN, ft.getMessage(), ft.getThrowable()); } }
/** * Log a message at level INFO according to the specified format and argument. * * <p> * This form avoids superfluous object creation when the logger is disabled * for the INFO level. * </p> * * @param format * the format string * @param arg * the argument */ @Override public void info(String format, Object arg) { if (logger.isInfoEnabled()) { FormattingTuple ft = MessageFormatter.format(format, arg); logger.log(FQCN, Level.INFO, ft.getMessage(), ft.getThrowable()); } }
protected void doLogf(final Level level, final String loggerClassName, final String format, final Object[] parameters, final Throwable thrown) { final org.apache.log4j.Level translatedLevel = translate(level); if (logger.isEnabledFor(translatedLevel)) try { logger.log(loggerClassName, translatedLevel, parameters == null ? String.format(format) : String.format(format, parameters), thrown); } catch (Throwable ignored) {} }
/** * 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) { if (logger.isEnabledFor(Level.ERROR)) { FormattingTuple ft = MessageFormatter.format(format, arg); logger.log(FQCN, Level.ERROR, ft.getMessage(), ft.getThrowable()); } }
/** * Log a message at level INFO according to the specified format and * arguments. * * <p> * This form avoids superfluous object creation when the logger is disabled * for the INFO level. * </p> * * @param format * the format string * @param argArray * an array of arguments */ @Override public void info(String format, Object... argArray) { if (logger.isInfoEnabled()) { FormattingTuple ft = MessageFormatter.arrayFormat(format, argArray); logger.log(FQCN, Level.INFO, ft.getMessage(), ft.getThrowable()); } }
protected void doLog(final Level level, final String loggerClassName, final Object message, final Object[] parameters, final Throwable thrown) { final org.apache.log4j.Level translatedLevel = translate(level); if (logger.isEnabledFor(translatedLevel)) try { logger.log(loggerClassName, translatedLevel, parameters == null || parameters.length == 0 ? message : MessageFormat.format(String.valueOf(message), parameters), thrown); } catch (Throwable ignored) {} }
/** * 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) { if (logger.isEnabledFor(Level.ERROR)) { FormattingTuple ft = MessageFormatter.arrayFormat(format, argArray); logger.log(FQCN, Level.ERROR, ft.getMessage(), ft.getThrowable()); } }
/** * Log a message at level DEBUG according to the specified format and * argument. * * <p> * This form avoids superfluous object creation when the logger is disabled * for level DEBUG. * </p> * * @param format * the format string * @param arg * the argument */ @Override public void debug(String format, Object arg) { if (logger.isDebugEnabled()) { FormattingTuple ft = MessageFormatter.format(format, arg); logger.log(FQCN, Level.DEBUG, ft.getMessage(), ft.getThrowable()); } }
/** * 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 */ public void error(String format, Object arg) { if (logger.isEnabledFor(Level.ERROR)) { FormattingTuple ft = MessageFormatter.format(format, arg); logger.log(FQCN, Level.ERROR, ft.getMessage(), ft.getThrowable()); } }
/** * Log a message at the WARN level according to the specified format and * arguments. * * <p> * This form avoids superfluous object creation when the logger is disabled * for the WARN level. * </p> * * @param format * the format string * @param argA * the first argument * @param argB * the second argument */ @Override public void warn(String format, Object argA, Object argB) { if (logger.isEnabledFor(Level.WARN)) { FormattingTuple ft = MessageFormatter.format(format, argA, argB); logger.log(FQCN, Level.WARN, ft.getMessage(), ft.getThrowable()); } }
/** * Log a message at level DEBUG according to the specified format and * arguments. * * <p> * This form avoids superfluous object creation when the logger is disabled * for the DEBUG level. * </p> * * @param format * the format string * @param argA * the first argument * @param argB * the second argument */ @Override public void debug(String format, Object argA, Object argB) { if (logger.isDebugEnabled()) { FormattingTuple ft = MessageFormatter.format(format, argA, argB); logger.log(FQCN, Level.DEBUG, ft.getMessage(), ft.getThrowable()); } }
/** * Log a message at the WARN level according to the specified format and * argument. * * <p> * This form avoids superfluous object creation when the logger is disabled * for the WARN level. * </p> * * @param format * the format string * @param arg * the argument */ public void warn(String format, Object arg) { if (logger.isEnabledFor(Level.WARN)) { FormattingTuple ft = MessageFormatter.format(format, arg); logger.log(FQCN, Level.WARN, 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 argA * the first argument * @param argB * the second argument */ @Override public void error(String format, Object argA, Object argB) { if (logger.isEnabledFor(Level.ERROR)) { FormattingTuple ft = MessageFormatter.format(format, argA, argB); logger.log(FQCN, Level.ERROR, ft.getMessage(), ft.getThrowable()); } }
/** * Log a message at the INFO level according to the specified format and * arguments. * * <p> * This form avoids superfluous object creation when the logger is disabled * for the INFO level. * </p> * * @param format * the format string * @param argA * the first argument * @param argB * the second argument */ @Override public void info(String format, Object argA, Object argB) { if (logger.isInfoEnabled()) { FormattingTuple ft = MessageFormatter.format(format, argA, argB); logger.log(FQCN, Level.INFO, 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 */ public void error(String format, Object arg1, Object arg2) { if (logger.isEnabledFor(Level.ERROR)) { FormattingTuple ft = MessageFormatter.format(format, arg1, arg2); logger.log(FQCN, Level.ERROR, ft.getMessage(), ft.getThrowable()); } }
/** * 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) { if (logger.isEnabledFor(Level.ERROR)) { FormattingTuple ft = MessageFormatter.format(format, arg); logger.log(FQCN, Level.ERROR, ft.getMessage(), ft.getThrowable()); } }