Package org.slf4j
Class LoggerFactory
java.lang.Object
org.slf4j.LoggerFactory
The
and
are also supported.
LoggerFactory is a utility class producing Loggers for
various logging APIs, most notably for log4j, logback and JDK 1.4 logging.
Other implementations such as
invalid reference
NOPLogger
invalid reference
SimpleLogger
LoggerFactory is essentially a wrapper around an
ILoggerFactory instance bound with LoggerFactory at
compile time.
Please note that all methods in LoggerFactory are static.
-
Method Summary
Modifier and TypeMethodDescriptionstatic ILoggerFactoryReturn theILoggerFactoryinstance in use.static LoggerReturn a logger named corresponding to the class passed as parameter, using the statically boundILoggerFactoryinstance.static LoggerReturn a logger named according to the name parameter using the statically boundILoggerFactoryinstance.
-
Method Details
-
getLogger
Return a logger named according to the name parameter using the statically boundILoggerFactoryinstance.- Parameters:
name- The name of the logger.- Returns:
- logger
-
getLogger
Return a logger named corresponding to the class passed as parameter, using the statically boundILoggerFactoryinstance.- Parameters:
clazz- the returned logger will be named after clazz- Returns:
- logger
-
getILoggerFactory
Return theILoggerFactoryinstance in use.ILoggerFactory instance is bound with this class at compile time.
- Returns:
- the ILoggerFactory instance in use
-