/** Is this <code>event</code> the e-mail triggering event? <p>This method returns <code>true</code>, if the event level has ERROR level or higher. Otherwise it returns <code>false</code>. */ public boolean isTriggeringEvent(LoggingEvent event) { return event.getLevel().isGreaterOrEqual(Level.ERROR); } }
/** Check whether this category is enabled for the info Level. See also {@link #isDebugEnabled}. @return boolean - <code>true</code> if this category is enabled for level info, <code>false</code> otherwise. */ public boolean isInfoEnabled() { if(repository.isDisabled(Level.INFO_INT)) return false; return Level.INFO.isGreaterOrEqual(this.getEffectiveLevel()); }
/** * Check whether this category is enabled for the TRACE Level. * @since 1.2.12 * * @return boolean - <code>true</code> if this category is enabled for level * TRACE, <code>false</code> otherwise. */ public boolean isTraceEnabled() { if (repository.isDisabled(Level.TRACE_INT)) { return false; } return Level.TRACE.isGreaterOrEqual(this.getEffectiveLevel()); }
public boolean isEnabled(final Level level) { final org.apache.log4j.Level l = translate( level ); return logger.isEnabledFor( l ) && l.isGreaterOrEqual( logger.getEffectiveLevel() ); }
public boolean isEnabled(final Level level) { final org.apache.log4j.Level l = translate(level); return logger.isEnabledFor(l) && l.isGreaterOrEqual(logger.getEffectiveLevel()); }
/** Log a message object with the <code>FATAL</code> level including the stack trace of the {@link Throwable} <code>t</code> passed as parameter. <p>See {@link #fatal(Object)} for more detailed information. @param message the message object to log. @param t the exception to log, including its stack trace. */ public void fatal(Object message, Throwable t) { if(repository.isDisabled(Level.FATAL_INT)) return; if(Level.FATAL.isGreaterOrEqual(this.getEffectiveLevel())) forcedLog(FQCN, Level.FATAL, message, t); }
/** Log a message object with the <code>INFO</code> level including the stack trace of the {@link Throwable} <code>t</code> passed as parameter. <p>See {@link #info(Object)} for more detailed information. @param message the message object to log. @param t the exception to log, including its stack trace. */ public void info(Object message, Throwable t) { if(repository.isDisabled(Level.INFO_INT)) return; if(Level.INFO.isGreaterOrEqual(this.getEffectiveLevel())) forcedLog(FQCN, Level.INFO, message, t); }
/** Log a message object with the <code>DEBUG</code> level including the stack trace of the {@link Throwable} <code>t</code> passed as parameter. <p>See {@link #debug(Object)} form for more detailed information. @param message the message object to log. @param t the exception to log, including its stack trace. */ public void debug(Object message, Throwable t) { if(repository.isDisabled(Level.DEBUG_INT)) return; if(Level.DEBUG.isGreaterOrEqual(this.getEffectiveLevel())) forcedLog(FQCN, Level.DEBUG, message, t); }
/** Log a message object with the <code>ERROR</code> level including the stack trace of the {@link Throwable} <code>t</code> passed as parameter. <p>See {@link #error(Object)} form for more detailed information. @param message the message object to log. @param t the exception to log, including its stack trace. */ public void error(Object message, Throwable t) { if(repository.isDisabled(Level.ERROR_INT)) return; if(Level.ERROR.isGreaterOrEqual(this.getEffectiveLevel())) forcedLog(FQCN, Level.ERROR, message, t); }
/** Log a message with the <code>WARN</code> level including the stack trace of the {@link Throwable} <code>t</code> passed as parameter. <p>See {@link #warn(Object)} for more detailed information. @param message the message object to log. @param t the exception to log, including its stack trace. */ public void warn(Object message, Throwable t) { if(repository.isDisabled(Level.WARN_INT)) return; if(Level.WARN.isGreaterOrEqual(this.getEffectiveLevel())) forcedLog(FQCN, Level.WARN, message, t); } }
/** * Log a message object with the {@link org.apache.log4j.Level#TRACE TRACE} level. * * @param message the message object to log. * @see #debug(Object) for an explanation of the logic applied. * @since 1.2.12 */ public void trace(Object message) { if (repository.isDisabled(Level.TRACE_INT)) { return; } if (Level.TRACE.isGreaterOrEqual(this.getEffectiveLevel())) { forcedLog(FQCN, Level.TRACE, message, null); } }
/** * Log a message object with the <code>TRACE</code> level including the * stack trace of the {@link Throwable}<code>t</code> passed as parameter. * * <p> * See {@link #debug(Object)} form for more detailed information. * </p> * * @param message the message object to log. * @param t the exception to log, including its stack trace. * @since 1.2.12 */ public void trace(Object message, Throwable t) { if (repository.isDisabled(Level.TRACE_INT)) { return; } if (Level.TRACE.isGreaterOrEqual(this.getEffectiveLevel())) { forcedLog(FQCN, Level.TRACE, message, t); } }
/** Log a message object with the {@link Level#ERROR ERROR} Level. <p>This method first checks if this category is <code>ERROR</code> enabled by comparing the level of this category with {@link Level#ERROR ERROR} Level. If this category is <code>ERROR</code> enabled, then it converts the message object passed as parameter to a string by invoking the appropriate {@link org.apache.log4j.or.ObjectRenderer}. It proceeds to call all the registered appenders in this category and also higher in the hierarchy depending on the value of the additivity flag. <p><b>WARNING</b> Note that passing a {@link Throwable} to this method will print the name of the <code>Throwable</code> but no stack trace. To print a stack trace use the {@link #error(Object, Throwable)} form instead. @param message the message object to log */ public void error(Object message) { if(repository.isDisabled(Level.ERROR_INT)) return; if(Level.ERROR.isGreaterOrEqual(this.getEffectiveLevel())) forcedLog(FQCN, Level.ERROR, message, null); }
/** Log a message object with the {@link Level#DEBUG DEBUG} level. <p>This method first checks if this category is <code>DEBUG</code> enabled by comparing the level of this category with the {@link Level#DEBUG DEBUG} level. If this category is <code>DEBUG</code> enabled, then it converts the message object (passed as parameter) to a string by invoking the appropriate {@link org.apache.log4j.or.ObjectRenderer}. It then proceeds to call all the registered appenders in this category and also higher in the hierarchy depending on the value of the additivity flag. <p><b>WARNING</b> Note that passing a {@link Throwable} to this method will print the name of the <code>Throwable</code> but no stack trace. To print a stack trace use the {@link #debug(Object, Throwable)} form instead. @param message the message object to log. */ public void debug(Object message) { if(repository.isDisabled(Level.DEBUG_INT)) return; if(Level.DEBUG.isGreaterOrEqual(this.getEffectiveLevel())) { forcedLog(FQCN, Level.DEBUG, message, null); } }
@Override public boolean isWarnEnabled() { setCodeLine(); return Level.WARN.isGreaterOrEqual( getLogger().getLevel() ); }
/** Log a message object with the {@link Level#FATAL FATAL} Level. <p>This method first checks if this category is <code>FATAL</code> enabled by comparing the level of this category with {@link Level#FATAL FATAL} Level. If the category is <code>FATAL</code> enabled, then it converts the message object passed as parameter to a string by invoking the appropriate {@link org.apache.log4j.or.ObjectRenderer}. It proceeds to call all the registered appenders in this category and also higher in the hierarchy depending on the value of the additivity flag. <p><b>WARNING</b> Note that passing a {@link Throwable} to this method will print the name of the Throwable but no stack trace. To print a stack trace use the {@link #fatal(Object, Throwable)} form instead. @param message the message object to log */ public void fatal(Object message) { if(repository.isDisabled(Level.FATAL_INT)) return; if(Level.FATAL.isGreaterOrEqual(this.getEffectiveLevel())) forcedLog(FQCN, Level.FATAL, message, null); }
/** Log a message object with the {@link Level#INFO INFO} Level. <p>This method first checks if this category is <code>INFO</code> enabled by comparing the level of this category with {@link Level#INFO INFO} Level. If the category is <code>INFO</code> enabled, then it converts the message object passed as parameter to a string by invoking the appropriate {@link org.apache.log4j.or.ObjectRenderer}. It proceeds to call all the registered appenders in this category and also higher in the hierarchy depending on the value of the additivity flag. <p><b>WARNING</b> Note that passing a {@link Throwable} to this method will print the name of the Throwable but no stack trace. To print a stack trace use the {@link #info(Object, Throwable)} form instead. @param message the message object to log */ public void info(Object message) { if(repository.isDisabled(Level.INFO_INT)) return; if(Level.INFO.isGreaterOrEqual(this.getEffectiveLevel())) forcedLog(FQCN, Level.INFO, message, null); }
/** Log a message object with the {@link Level#WARN WARN} Level. <p>This method first checks if this category is <code>WARN</code> enabled by comparing the level of this category with {@link Level#WARN WARN} Level. If the category is <code>WARN</code> enabled, then it converts the message object passed as parameter to a string by invoking the appropriate {@link org.apache.log4j.or.ObjectRenderer}. It proceeds to call all the registered appenders in this category and also higher in the hieararchy depending on the value of the additivity flag. <p><b>WARNING</b> Note that passing a {@link Throwable} to this method will print the name of the Throwable but no stack trace. To print a stack trace use the {@link #warn(Object, Throwable)} form instead. <p> @param message the message object to log. */ public void warn(Object message) { if(repository.isDisabled( Level.WARN_INT)) return; if(Level.WARN.isGreaterOrEqual(this.getEffectiveLevel())) forcedLog(FQCN, Level.WARN, message, null); }
@Override public boolean isErrorEnabled() { setCodeLine(); return Level.ERROR.isGreaterOrEqual( getLogger().getLevel() ); }
@Override public boolean isFatalEnabled() { setCodeLine(); return Level.FATAL.isGreaterOrEqual( getLogger().getLevel() ); }