/** * Logs a message with <code>org.apache.commons.logging.impl.SimpleLog.LOG_LEVEL_TRACE</code>. * * @param message to log * @see org.apache.commons.logging.Log#trace(Object) */ public final void trace(Object message) { if (isLevelEnabled(SimpleLog.LOG_LEVEL_TRACE)) { log(SimpleLog.LOG_LEVEL_TRACE, message, null); } }
/** * Are error messages currently enabled? * <p> * This allows expensive operations such as <code>String</code> * concatenation to be avoided when the message will be ignored by the * logger. */ public final boolean isErrorEnabled() { return isLevelEnabled(SimpleLog.LOG_LEVEL_ERROR); }
/** * Output a diagnostic message to a user-specified destination (if the * user has enabled diagnostic logging). * * @param msg diagnostic message * @since 1.1 */ protected void logDiagnostic(String msg) { if (isDiagnosticsEnabled()) { logRawDiagnostic(diagnosticPrefix + msg); } }
/** * Base constructor. */ public Log4JLogger(String name) { this.name = name; this.logger = getLogger(); }
/** * Construct a named instance of this Logger. * * @param name Name of the logger to be constructed */ public Jdk14Logger(String name) { this.name = name; logger = getLogger(); }
/** * Is <em>JDK 1.3 with Lumberjack</em> logging available? * * @deprecated Never invoked by this class; subclasses should not assume * it will be. */ protected boolean isJdk13LumberjackAvailable() { return isLogLibraryAvailable( "Jdk13Lumberjack", "org.apache.commons.logging.impl.Jdk13LumberjackLogger"); }
/** * Initialize a number of variables that control the behaviour of this * class and that can be tweaked by the user. This is done when the first * logger is created, not in the constructor of this class, because we * need to give the user a chance to call method setAttribute in order to * configure this object. */ private void initConfiguration() { allowFlawedContext = getBooleanConfiguration(ALLOW_FLAWED_CONTEXT_PROPERTY, true); allowFlawedDiscovery = getBooleanConfiguration(ALLOW_FLAWED_DISCOVERY_PROPERTY, true); allowFlawedHierarchy = getBooleanConfiguration(ALLOW_FLAWED_HIERARCHY_PROPERTY, true); }
/** * Construct a named instance of this Logger. * * @param name Name of the logger to be constructed */ public Jdk13LumberjackLogger(String name) { this.name = name; logger = getLogger(); }
/** * Logs a message with <code>org.apache.log.Priority.DEBUG</code>. * * @param message to log * @see org.apache.commons.logging.Log#trace(Object) */ public void trace(Object message) { debug(message); }
/** * Logs a message with <code>org.apache.commons.logging.impl.SimpleLog.LOG_LEVEL_INFO</code>. * * @param message to log * @see org.apache.commons.logging.Log#info(Object) */ public final void info(Object message) { if (isLevelEnabled(SimpleLog.LOG_LEVEL_INFO)) { log(SimpleLog.LOG_LEVEL_INFO,message,null); } }
/** * Are info messages currently enabled? * <p> * This allows expensive operations such as <code>String</code> * concatenation to be avoided when the message will be ignored by the * logger. */ public final boolean isInfoEnabled() { return isLevelEnabled(SimpleLog.LOG_LEVEL_INFO); }
/** * Is a <em>Log4J</em> implementation available? * * @deprecated Never invoked by this class; subclasses should not assume * it will be. */ protected boolean isLog4JAvailable() { return isLogLibraryAvailable( "Log4J", LOGGING_IMPL_LOG4J_LOGGER); }
/** * Logs a message with <code>org.apache.log.Priority.DEBUG</code>. * * @param message to log * @param t log this cause * @see org.apache.commons.logging.Log#trace(Object, Throwable) */ public void trace(Object message, Throwable t) { debug(message, t); }
/** * Logs a message with <code>org.apache.commons.logging.impl.SimpleLog.LOG_LEVEL_WARN</code>. * * @param message to log * @see org.apache.commons.logging.Log#warn(Object) */ public final void warn(Object message) { if (isLevelEnabled(SimpleLog.LOG_LEVEL_WARN)) { log(SimpleLog.LOG_LEVEL_WARN, message, null); } }
/** * Are fatal messages currently enabled? * <p> * This allows expensive operations such as <code>String</code> * concatenation to be avoided when the message will be ignored by the * logger. */ public final boolean isFatalEnabled() { return isLevelEnabled(SimpleLog.LOG_LEVEL_FATAL); }
/** * Logs a message with * <code>org.apache.commons.logging.impl.SimpleLog.LOG_LEVEL_DEBUG</code>. * * @param message to log * @see org.apache.commons.logging.Log#debug(Object) */ public final void debug(Object message) { if (isLevelEnabled(SimpleLog.LOG_LEVEL_DEBUG)) { log(SimpleLog.LOG_LEVEL_DEBUG, message, null); } }
/** * Are debug messages currently enabled? * <p> * This allows expensive operations such as <code>String</code> * concatenation to be avoided when the message will be ignored by the * logger. */ public final boolean isDebugEnabled() { return isLevelEnabled(SimpleLog.LOG_LEVEL_DEBUG); }
/** * Logs a message with <code>org.apache.commons.logging.impl.SimpleLog.LOG_LEVEL_WARN</code>. * * @param message to log * @param t log this cause * @see org.apache.commons.logging.Log#warn(Object, Throwable) */ public final void warn(Object message, Throwable t) { if (isLevelEnabled(SimpleLog.LOG_LEVEL_WARN)) { log(SimpleLog.LOG_LEVEL_WARN, message, t); } }
/** * Logs a message with <code>org.apache.commons.logging.impl.SimpleLog.LOG_LEVEL_ERROR</code>. * * @param message to log * @see org.apache.commons.logging.Log#error(Object) */ public final void error(Object message) { if (isLevelEnabled(SimpleLog.LOG_LEVEL_ERROR)) { log(SimpleLog.LOG_LEVEL_ERROR, message, null); } }
/** * Log a message with <code>org.apache.commons.logging.impl.SimpleLog.LOG_LEVEL_FATAL</code>. * * @param message to log * @see org.apache.commons.logging.Log#fatal(Object) */ public final void fatal(Object message) { if (isLevelEnabled(SimpleLog.LOG_LEVEL_FATAL)) { log(SimpleLog.LOG_LEVEL_FATAL, message, null); } }