/** This generic form is intended to be used by wrappers. */ public void log(Priority priority, Object message) { if(repository.isDisabled(priority.level)) { return; } if(priority.isGreaterOrEqual(this.getEffectiveLevel())) forcedLog(FQCN, priority, message, null); }
/** This generic form is intended to be used by wrappers. */ public void log(Priority priority, Object message, Throwable t) { if(repository.isDisabled(priority.level)) { return; } if(priority.isGreaterOrEqual(this.getEffectiveLevel())) forcedLog(FQCN, priority, 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>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>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); } }
/** This is the most generic printing method. It is intended to be invoked by <b>wrapper</b> classes. @param callerFQCN The wrapper class' fully qualified class name. @param level The level of the logging request. @param message The message of the logging request. @param t The throwable of the logging request, may be null. */ public void log(String callerFQCN, Priority level, Object message, Throwable t) { if(repository.isDisabled(level.level)) { return; } if(level.isGreaterOrEqual(this.getEffectiveLevel())) { forcedLog(callerFQCN, level, 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#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); }
/** 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); } }
/** Log a localized and parameterized message. First, the user supplied <code>key</code> is searched in the resource bundle. Next, the resulting pattern is formatted using {@link java.text.MessageFormat#format(String,Object[])} method with the user supplied object array <code>params</code>. @since 0.8.4 */ public void l7dlog(Priority priority, String key, Object[] params, Throwable t) { if(repository.isDisabled(priority.level)) { return; } if(priority.isGreaterOrEqual(this.getEffectiveLevel())) { String pattern = getResourceBundleString(key); String msg; if(pattern == null) msg = key; else msg = java.text.MessageFormat.format(pattern, params); forcedLog(FQCN, priority, msg, t); } }
/** Log a localized message. The user supplied parameter <code>key</code> is replaced by its localized version from the resource bundle. @see #setResourceBundle @since 0.8.4 */ public void l7dlog(Priority priority, String key, Throwable t) { if(repository.isDisabled(priority.level)) { return; } if(priority.isGreaterOrEqual(this.getEffectiveLevel())) { String msg = getResourceBundleString(key); // if message corresponding to 'key' could not be found in the // resource bundle, then default to 'key'. if(msg == null) { msg = key; } forcedLog(FQCN, priority, msg, t); } } /**
/** This generic form is intended to be used by wrappers. */ public void log(Priority priority, Object message) { if(repository.isDisabled(priority.level)) { return; } if(priority.isGreaterOrEqual(this.getEffectiveLevel())) forcedLog(FQCN, priority, message, null); }
/** This generic form is intended to be used by wrappers. */ public void log(Priority priority, Object message) { if(repository.isDisabled(priority.level)) { return; } if(priority.isGreaterOrEqual(this.getEffectiveLevel())) { forcedLog(FQCN, priority, message, null); } }
/** This generic form is intended to be used by wrappers. */ public void log(Priority priority, Object message, Throwable t) { if(repository.isDisabled(priority.level)) { return; } if(priority.isGreaterOrEqual(this.getEffectiveLevel())) { forcedLog(FQCN, priority, message, t); } }
/** This generic form is intended to be used by wrappers. */ public void log(Priority priority, Object message, Throwable t) { if(repository.isDisabled(priority.level)) { return; } if(priority.isGreaterOrEqual(this.getEffectiveLevel())) forcedLog(FQCN, priority, 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); }