相关文章推荐
鬼畜的太阳  ·  selenium ...·  3 周前    · 
坚强的大蒜  ·  Spinner的Android:prompt ...·  4 月前    · 
玩命的小虾米  ·  基于 D3.js 的 SVG ...·  1 年前    · 
This class is a minimal implementation of the original org.apache.log4j.Category class (as found in log4j 1.2) by delegation of all calls to a Logger instance. Log4j's trace , debug() , info() , warn() , error() printing methods are directly mapped to their SLF4J equivalents. Log4j's fatal() printing method is mapped to SLF4J's error() method with a FATAL marker.

Method Summary

All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method and Description addAppender ( Appender newAppender) assertLog (boolean assertion, java.lang.String msg) debug (java.lang.Object message)
Delegates to Logger.debug(String) method of SLF4J.
debug (java.lang.Object message, java.lang.Throwable t)
Delegates to Logger.debug(String,Throwable) method in SLF4J.
error (java.lang.Object message)
Delegates to Logger.error(String) method in SLF4J.
error (java.lang.Object message, java.lang.Throwable t)
Delegates to Logger.error(String,Throwable) method in SLF4J.
fatal (java.lang.Object message)
Delegates to Logger.error(String) method in SLF4J.
fatal (java.lang.Object message, java.lang.Throwable t)
Delegates to Logger.error(String,Throwable) method in SLF4J.
boolean getAdditivity () java.util.Enumeration getAllAppenders () Appender getAppender (java.lang.String name) Level getEffectiveLevel ()
Return the level in effect for this category/logger.
static Category getInstance (java.lang.Class clazz) static Category getInstance (java.lang.String name) Level getLevel ()
Returns the assigned Level , if any, for this Category.
java.lang.String getName ()
Returns the obvious.
Category getParent () Level getPriority ()
Deprecated.
Please use getLevel() instead.
info (java.lang.Object message, java.lang.Throwable t)
Delegates to Logger.info(String,Throwable) method in SLF4J.
boolean isDebugEnabled ()
Delegates to Logger.isDebugEnabled() method in SLF4J
boolean isEnabledFor ( Priority p)
Determines whether the priority passed as parameter is enabled in the underlying SLF4J logger.
boolean isErrorEnabled ()
Delegates to Logger.isErrorEnabled() method in SLF4J
boolean isInfoEnabled ()
Delegates to Logger.isInfoEnabled() method in SLF4J
boolean isWarnEnabled ()
Delegates to Logger.isWarnEnabled() method in SLF4J
log ( Priority p, java.lang.Object message) log ( Priority p, java.lang.Object message, java.lang.Throwable t) log (java.lang.String FQCN, Priority p, java.lang.Object msg, java.lang.Throwable t) setAdditivity (boolean additive) setLevel ( Level level) warn (java.lang.Object message)
Delegates to Logger.warn(String) method in SLF4J.
warn (java.lang.Object message, java.lang.Throwable t)
Delegates to Logger.warn(String,Throwable) method in SLF4J.

getEffectiveLevel

public Level getEffectiveLevel()
Return the level in effect for this category/logger. The result is computed by simulation.

Returns:

getLevel

public final Level getLevel()
Returns the assigned Level , if any, for this Category. This implementation always returns null.
Returns:
Level - the assigned Level, can be null .

isEnabledFor

public boolean isEnabledFor(Priority p)
Determines whether the priority passed as parameter is enabled in the underlying SLF4J logger. Each log4j priority is mapped directly to its SLF4J equivalent, except for FATAL which is mapped as ERROR.
Parameters:
p - the priority to check against
Returns:
true if this logger is enabled for the given level, false otherwise.
public void debug(java.lang.Object message,
                  java.lang.Throwable t)
Delegates to Logger.debug(String,Throwable) method in SLF4J.
public void info(java.lang.Object message,
                 java.lang.Throwable t)
Delegates to Logger.info(String,Throwable) method in SLF4J.
public void warn(java.lang.Object message,
                 java.lang.Throwable t)
Delegates to Logger.warn(String,Throwable) method in SLF4J.
public void error(java.lang.Object message,
                  java.lang.Throwable t)
Delegates to Logger.error(String,Throwable) method in SLF4J.
public void fatal(java.lang.Object message,
                  java.lang.Throwable t)
Delegates to Logger.error(String,Throwable) method in SLF4J. In addition, the call is marked with a marker named "FATAL".