public class LoggerFactory
extends java.lang.Object
This class implements a thin wrapper around a subset of methods of
the LoggerFactory
class from the SLF4J facade, in order to allow
those methods commonly used by the toolkit to be usable without invoking
a runtime dependency on the SLF4J jar files.
The LoggerFactory
produces
a LoggerFactory
instance if the slf4j-api
and an slf4j implementation are present at run time.
Otherwise it mimics the behavior of the slf4j-simple implementation
and writes messages to System.err
.
For how to configure the logger properties, see the package description.
Logger
Modifier and Type | Field and Description |
---|---|
protected static java.lang.Class<?> |
slf4jClass |
Constructor and Description |
---|
LoggerFactory() |
Modifier and Type | Method and Description |
---|---|
static Logger |
getLogger(java.lang.Class<?> clazz)
Return a logger named corresponding to the class passed as parameter.
|
public static Logger getLogger(java.lang.Class<?> clazz)
Return a logger named corresponding to the class passed as parameter.
Be warned that if slf4j.detectLoggerNameMismatch system property is set to true at run time (the default is false), a logger name mismatch warning will always be printed when an slf4j implementation is present.
clazz
- the returned logger will be named after clazz