Class LoggerFactory
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.
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
slf4jClass
-
-
Constructor Details
-
LoggerFactory
public LoggerFactory()
-
-
Method Details
-
getLogger
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.
- Parameters:
clazz
- the returned logger will be named after clazz
-