public class Category
extends java.lang.Object
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.
Modifier and Type | Method and Description |
---|---|
void |
addAppender(Appender newAppender) |
void |
assertLog(boolean assertion,
java.lang.String msg) |
void |
debug(java.lang.Object message)
Delegates to
Logger.debug(String) method of SLF4J. |
void |
debug(java.lang.Object message,
java.lang.Throwable t)
Delegates to
Logger.debug(String,Throwable) method in
SLF4J. |
void |
error(java.lang.Object message)
Delegates to
Logger.error(String) method in SLF4J. |
void |
error(java.lang.Object message,
java.lang.Throwable t)
Delegates to
Logger.error(String,Throwable) method in
SLF4J. |
void |
fatal(java.lang.Object message)
Delegates to
Logger.error(String) method in SLF4J. |
void |
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. |
void |
info(java.lang.Object message)
Delegates to
Logger.info(String) method in SLF4J. |
void |
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 |
void |
log(Priority p,
java.lang.Object message) |
void |
log(Priority p,
java.lang.Object message,
java.lang.Throwable t) |
void |
log(java.lang.String FQCN,
Priority p,
java.lang.Object msg,
java.lang.Throwable t) |
void |
setAdditivity(boolean additive) |
void |
setLevel(Level level) |
void |
warn(java.lang.Object message)
Delegates to
Logger.warn(String) method in SLF4J. |
void |
warn(java.lang.Object message,
java.lang.Throwable t)
Delegates to
Logger.warn(String,Throwable) method in
SLF4J. |
public static Category getInstance(java.lang.Class clazz)
public static Category getInstance(java.lang.String name)
public final Category getParent()
public java.lang.String getName()
public Appender getAppender(java.lang.String name)
public java.util.Enumeration getAllAppenders()
public Level getEffectiveLevel()
The result is computed by simulation.
public final Level getLevel()
Level
, if any, for this Category. This
implementation always returns null.null
.public final Level getPriority()
getLevel()
instead.public boolean isDebugEnabled()
Logger.isDebugEnabled()
method in SLF4Jpublic boolean isInfoEnabled()
Logger.isInfoEnabled()
method in SLF4Jpublic boolean isWarnEnabled()
Logger.isWarnEnabled()
method in SLF4Jpublic boolean isErrorEnabled()
Logger.isErrorEnabled()
method in SLF4Jpublic boolean isEnabledFor(Priority p)
p
- the priority to check againstpublic void debug(java.lang.Object message)
Logger.debug(String)
method of SLF4J.public void debug(java.lang.Object message, java.lang.Throwable t)
Logger.debug(String,Throwable)
method in
SLF4J.public void info(java.lang.Object message)
Logger.info(String)
method in SLF4J.public void info(java.lang.Object message, java.lang.Throwable t)
Logger.info(String,Throwable)
method in
SLF4J.public void warn(java.lang.Object message)
Logger.warn(String)
method in SLF4J.public void warn(java.lang.Object message, java.lang.Throwable t)
Logger.warn(String,Throwable)
method in
SLF4J.public void error(java.lang.Object message)
Logger.error(String)
method in SLF4J.public void error(java.lang.Object message, java.lang.Throwable t)
Logger.error(String,Throwable)
method in
SLF4J.public void fatal(java.lang.Object message)
Logger.error(String)
method in SLF4J.public void fatal(java.lang.Object message, java.lang.Throwable t)
Logger.error(String,Throwable)
method in
SLF4J. In addition, the call is marked with a marker named "FATAL".public void log(java.lang.String FQCN, Priority p, java.lang.Object msg, java.lang.Throwable t)
public void log(Priority p, java.lang.Object message, java.lang.Throwable t)
public void log(Priority p, java.lang.Object message)
public void setAdditivity(boolean additive)
public void addAppender(Appender newAppender)
public void setLevel(Level level)
public boolean getAdditivity()
public void assertLog(boolean assertion, java.lang.String msg)
"Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"