Package org.apache.log4j
Class Category
- java.lang.Object
-
- org.apache.log4j.Category
-
- Direct Known Subclasses:
Logger
@Deprecated(since="2022-01-27") public class Category extends java.lang.Object
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 aLogger
instance.Log4j's
trace
,debug()
,info()
,warn()
,error()
printing methods are directly mapped to their SLF4J equivalents. Log4j'sfatal()
printing method is mapped to SLF4J'serror()
method with a FATAL marker.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
addAppender(Appender newAppender)
Deprecated.void
assertLog(boolean assertion, java.lang.String msg)
Deprecated.void
debug(java.lang.Object message)
Deprecated.Delegates toLogger.debug(String)
method of SLF4J.void
debug(java.lang.Object message, java.lang.Throwable t)
Deprecated.Delegates toLogger.debug(String,Throwable)
method in SLF4J.void
error(java.lang.Object message)
Deprecated.Delegates toLogger.error(String)
method in SLF4J.void
error(java.lang.Object message, java.lang.Throwable t)
Deprecated.Delegates toLogger.error(String,Throwable)
method in SLF4J.void
fatal(java.lang.Object message)
Deprecated.Delegates toLogger.error(String)
method in SLF4J.void
fatal(java.lang.Object message, java.lang.Throwable t)
Deprecated.Delegates toLogger.error(String,Throwable)
method in SLF4J.boolean
getAdditivity()
Deprecated.java.util.Enumeration
getAllAppenders()
Deprecated.Appender
getAppender(java.lang.String name)
Deprecated.Level
getEffectiveLevel()
Deprecated.Return the level in effect for this category/logger.static Category
getInstance(java.lang.Class clazz)
Deprecated.static Category
getInstance(java.lang.String name)
Deprecated.Level
getLevel()
Deprecated.Returns the assignedLevel
, if any, for this Category.java.lang.String
getName()
Deprecated.Returns the obvious.Category
getParent()
Deprecated.Level
getPriority()
Deprecated.Please usegetLevel()
instead.void
info(java.lang.Object message)
Deprecated.Delegates toLogger.info(String)
method in SLF4J.void
info(java.lang.Object message, java.lang.Throwable t)
Deprecated.Delegates toLogger.info(String,Throwable)
method in SLF4J.boolean
isDebugEnabled()
Deprecated.Delegates toLogger.isDebugEnabled()
method in SLF4Jboolean
isEnabledFor(Priority p)
Deprecated.Determines whether the priority passed as parameter is enabled in the underlying SLF4J logger.boolean
isErrorEnabled()
Deprecated.Delegates toLogger.isErrorEnabled()
method in SLF4Jboolean
isInfoEnabled()
Deprecated.Delegates toLogger.isInfoEnabled()
method in SLF4Jboolean
isWarnEnabled()
Deprecated.Delegates toLogger.isWarnEnabled()
method in SLF4Jvoid
log(java.lang.String FQCN, Priority p, java.lang.Object msg, java.lang.Throwable t)
Deprecated.void
log(Priority p, java.lang.Object message)
Deprecated.void
log(Priority p, java.lang.Object message, java.lang.Throwable t)
Deprecated.void
setAdditivity(boolean additive)
Deprecated.void
setLevel(Level level)
Deprecated.void
warn(java.lang.Object message)
Deprecated.Delegates toLogger.warn(String)
method in SLF4J.void
warn(java.lang.Object message, java.lang.Throwable t)
Deprecated.Delegates toLogger.warn(String,Throwable)
method in SLF4J.
-
-
-
Method Detail
-
getInstance
public static Category getInstance(java.lang.Class clazz)
Deprecated.
-
getInstance
public static Category getInstance(java.lang.String name)
Deprecated.
-
getParent
public final Category getParent()
Deprecated.
-
getName
public java.lang.String getName()
Deprecated.Returns the obvious.- Returns:
-
getAppender
public Appender getAppender(java.lang.String name)
Deprecated.
-
getAllAppenders
public java.util.Enumeration getAllAppenders()
Deprecated.
-
getEffectiveLevel
public Level getEffectiveLevel()
Deprecated.Return the level in effect for this category/logger.The result is computed by simulation.
- Returns:
-
getLevel
public final Level getLevel()
Deprecated.Returns the assignedLevel
, if any, for this Category. This implementation always returns null.- Returns:
- Level - the assigned Level, can be
null
.
-
getPriority
public final Level 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
public boolean isEnabledFor(Priority p)
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
public void debug(java.lang.Object message)
Deprecated.Delegates toLogger.debug(String)
method of SLF4J.
-
debug
public void debug(java.lang.Object message, java.lang.Throwable t)
Deprecated.Delegates toLogger.debug(String,Throwable)
method in SLF4J.
-
info
public void info(java.lang.Object message)
Deprecated.Delegates toLogger.info(String)
method in SLF4J.
-
info
public void info(java.lang.Object message, java.lang.Throwable t)
Deprecated.Delegates toLogger.info(String,Throwable)
method in SLF4J.
-
warn
public void warn(java.lang.Object message)
Deprecated.Delegates toLogger.warn(String)
method in SLF4J.
-
warn
public void warn(java.lang.Object message, java.lang.Throwable t)
Deprecated.Delegates toLogger.warn(String,Throwable)
method in SLF4J.
-
error
public void error(java.lang.Object message)
Deprecated.Delegates toLogger.error(String)
method in SLF4J.
-
error
public void error(java.lang.Object message, java.lang.Throwable t)
Deprecated.Delegates toLogger.error(String,Throwable)
method in SLF4J.
-
fatal
public void fatal(java.lang.Object message)
Deprecated.Delegates toLogger.error(String)
method in SLF4J.
-
fatal
public void fatal(java.lang.Object message, java.lang.Throwable t)
Deprecated.Delegates toLogger.error(String,Throwable)
method in SLF4J. In addition, the call is marked with a marker named "FATAL".
-
log
public void log(java.lang.String FQCN, Priority p, java.lang.Object msg, java.lang.Throwable t)
Deprecated.
-
log
public void log(Priority p, java.lang.Object message, java.lang.Throwable t)
Deprecated.
-
log
public void log(Priority p, java.lang.Object message)
Deprecated.
-
setAdditivity
public void setAdditivity(boolean additive)
Deprecated.
-
addAppender
public void addAppender(Appender newAppender)
Deprecated.
-
setLevel
public void setLevel(Level level)
Deprecated.
-
getAdditivity
public boolean getAdditivity()
Deprecated.
-
assertLog
public void assertLog(boolean assertion, java.lang.String msg)
Deprecated.
-
-