Package org.apache.log4j
Class Category
java.lang.Object
org.apache.log4j.Category
- Direct Known Subclasses:
Logger
Deprecated.
Apache Log4j 1 has reached end of life in 2015 and is no longer supported.
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
Modifier and TypeMethodDescriptionvoidaddAppender(Appender newAppender) Deprecated.voidDeprecated.voidDeprecated.Delegates toLogger.debug(String)method of SLF4J.voidDeprecated.Delegates toLogger.debug(String,Throwable)method in SLF4J.voidDeprecated.Delegates toLogger.error(String)method in SLF4J.voidDeprecated.Delegates toLogger.error(String,Throwable)method in SLF4J.voidDeprecated.Delegates toLogger.error(String)method in SLF4J.voidDeprecated.Delegates toLogger.error(String,Throwable)method in SLF4J.booleanDeprecated.Deprecated.getAppender(String name) Deprecated.Deprecated.Return the level in effect for this category/logger.static CategorygetInstance(Class clazz) Deprecated.static CategorygetInstance(String name) Deprecated.final LevelgetLevel()Deprecated.Returns the assignedLevel, if any, for this Category.getName()Deprecated.Returns the obvious.final CategoryDeprecated.final LevelDeprecated.Please usegetLevel()instead.voidDeprecated.Delegates toLogger.info(String)method in SLF4J.voidDeprecated.Delegates toLogger.info(String,Throwable)method in SLF4J.booleanDeprecated.Delegates toLogger.isDebugEnabled()method in SLF4JbooleanDeprecated.Determines whether the priority passed as parameter is enabled in the underlying SLF4J logger.booleanDeprecated.Delegates toLogger.isErrorEnabled()method in SLF4JbooleanDeprecated.Delegates toLogger.isInfoEnabled()method in SLF4JbooleanDeprecated.Delegates toLogger.isWarnEnabled()method in SLF4JvoidDeprecated.voidDeprecated.voidDeprecated.voidsetAdditivity(boolean additive) Deprecated.voidDeprecated.voidDeprecated.Delegates toLogger.warn(String)method in SLF4J.voidDeprecated.Delegates toLogger.warn(String,Throwable)method in SLF4J.
-
Method Details
-
getInstance
Deprecated. -
getInstance
Deprecated. -
getParent
Deprecated. -
getName
Deprecated.Returns the obvious.- Returns:
-
getAppender
Deprecated. -
getAllAppenders
Deprecated. -
getEffectiveLevel
Deprecated.Return the level in effect for this category/logger.The result is computed by simulation.
- Returns:
-
getLevel
Deprecated.Returns the assignedLevel, if any, for this Category. This implementation always returns null.- Returns:
- Level - the assigned Level, can be
null.
-
getPriority
Deprecated.Please usegetLevel()instead. -
isDebugEnabled
public boolean isDebugEnabled()Deprecated.Delegates toLogger.isDebugEnabled()method in SLF4J -
isInfoEnabled
public boolean isInfoEnabled()Deprecated.Delegates toLogger.isInfoEnabled()method in SLF4J -
isWarnEnabled
public boolean isWarnEnabled()Deprecated.Delegates toLogger.isWarnEnabled()method in SLF4J -
isErrorEnabled
public boolean isErrorEnabled()Deprecated.Delegates toLogger.isErrorEnabled()method in SLF4J -
isEnabledFor
Deprecated.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.
-
debug
Deprecated.Delegates toLogger.debug(String)method of SLF4J. -
debug
Deprecated.Delegates toLogger.debug(String,Throwable)method in SLF4J. -
info
Deprecated.Delegates toLogger.info(String)method in SLF4J. -
info
Deprecated.Delegates toLogger.info(String,Throwable)method in SLF4J. -
warn
Deprecated.Delegates toLogger.warn(String)method in SLF4J. -
warn
Deprecated.Delegates toLogger.warn(String,Throwable)method in SLF4J. -
error
Deprecated.Delegates toLogger.error(String)method in SLF4J. -
error
Deprecated.Delegates toLogger.error(String,Throwable)method in SLF4J. -
fatal
Deprecated.Delegates toLogger.error(String)method in SLF4J. -
fatal
Deprecated.Delegates toLogger.error(String,Throwable)method in SLF4J. In addition, the call is marked with a marker named "FATAL". -
log
Deprecated. -
log
Deprecated. -
log
Deprecated. -
setAdditivity
public void setAdditivity(boolean additive) Deprecated. -
addAppender
Deprecated. -
setLevel
Deprecated. -
getAdditivity
public boolean getAdditivity()Deprecated. -
assertLog
Deprecated.
-