The
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
NOPLogger and
SimpleLogger are also supported.
LoggerFactory is essentially a wrapper around an
ILoggerFactory instance bound with LoggerFactory at
compile time.
Please note that all methods in LoggerFactory are static.
It is out responsibility to track version changes and manage the
compatibility list.
if (msg != null && msg.indexOf("org/slf4j/impl/StaticLoggerBinder") != -1) { .reportFailure("Failed to load class \"org.slf4j.impl.StaticLoggerBinder\"."); + " for further details.");
if (loggerNameList.size() == 0) { .reportFailure("The following loggers will not work becasue they were created"); .reportFailure("during the default configuration phase of the underlying logging system."); for (int i = 0; i < loggerNameList.size(); i++) { + " by your slf4j binding is not compatible with "
"Unexpected problem occured during version sanity check", e);
Return a logger named according to the name parameter using the statically
bound
ILoggerFactory instance.
- Parameters:
name
The name of the logger.- Returns:
- logger
"Logging factory implementation cannot be null. See also "
Return a logger named corresponding to the class passed as parameter, using
the statically bound
ILoggerFactory instance.
- Parameters:
clazz
the returned logger will be named after clazz- Returns:
- logger
"Logging factory implementation cannot be null. See also "
Return the
ILoggerFactory instance in use.
ILoggerFactory instance is bound with this class at compile time.
- Returns:
- the ILoggerFactory instance in use