Class LoggerFactory
- java.lang.Object
-
- com.pixelmed.slf4j.LoggerFactory
-
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 aLoggerFactory
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:
Logger
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.Class<?>
slf4jClass
-
Constructor Summary
Constructors Constructor Description LoggerFactory()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Logger
getLogger(java.lang.Class<?> clazz)
Return a logger named corresponding to the class passed as parameter.
-
-
-
Method Detail
-
getLogger
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.
- Parameters:
clazz
- the returned logger will be named after clazz
-
-