public final class LoggerFactory
extends java.lang.Object
LoggerFactory
is a utility class producing Loggers for various logging APIs, most notably for log4j,
logback JDK 1.4 logging, and JSimple logging.
LoggerFactory
is essentially a wrapper around an ILoggerFactory
instance bound with
LoggerFactory
at compile time.
Please note that all methods in LoggerFactory
are static.Modifier and Type | Method and Description |
---|---|
static Logger |
getLogger(java.lang.String name)
Return a logger named according to the name parameter using the statically bound
ILoggerFactory instance. |
static void |
init(ILoggerFactory loggerFactory) |
public static void init(ILoggerFactory loggerFactory)
public static Logger getLogger(java.lang.String name)
ILoggerFactory
instance.
If the LoggerFactory hasn't been initialized yet (init hasn't been called), the NOPLogger is returned, where
logged messages don't go anywhere.name
- The name of the logger.