org.apache.log4j
public class Category extends 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 org.slf4j.Logger.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.
| Field Summary | |
|---|---|
| protected Logger | slf4jLogger |
| Method Summary | |
|---|---|
| protected String | convertToString(Object message) |
| void | debug(Object message)
Delegates to debug method of SLF4J. |
| void | debug(Object message, Throwable t)
Delegates to debug method in
SLF4J. |
| void | error(Object message)
Delegates to error method in SLF4J. |
| void | error(Object message, Throwable t)
Delegates to error method in
SLF4J. |
| void | fatal(Object message)
Delegates to error method in SLF4J. |
| void | fatal(Object message, Throwable t)
Delegates to error method in
SLF4J. |
| Level | getEffectiveLevel()
Return the level in effect for this category/logger.
|
| static Category | getInstance(Class clazz) |
| static Category | getInstance(String name) |
| Level | getLevel()
Returns the assigned Level, if any, for this Category. |
| String | getName()
Returns the obvious.
|
| Level | getPriority() |
| void | info(Object message)
Delegates to info method in SLF4J. |
| void | info(Object message, Throwable t)
Delegates to info method in
SLF4J. |
| boolean | isDebugEnabled()
Delegates to Logger 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 method in SLF4J |
| boolean | isInfoEnabled()
Delegates to Logger method in SLF4J |
| boolean | isWarnEnabled()
Delegates tob Logger method in SLF4J |
| void | log(String FQCN, Priority p, Object msg, Throwable t) |
| void | warn(Object message)
Delegates to warn method in SLF4J. |
| void | warn(Object message, Throwable t)
Delegates to warn method in
SLF4J. |
The result is computed by simulation.
Returns:
Returns: Level - the assigned Level, can be null.
Returns:
Deprecated: Please use Category instead.
Parameters: p the priority to check against
Returns: true if this logger is enabled for the given level, false otherwise.