public final class LoggerFactory extends Object
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.Modifier and Type | Method and Description |
---|---|
static ILoggerFactory |
getILoggerFactory()
Return the
ILoggerFactory instance in use. |
static Logger |
getLogger(Class clazz)
Return a logger named corresponding to the class passed as parameter, using
the statically bound
ILoggerFactory instance. |
static Logger |
getLogger(String name)
Return a logger named according to the name parameter using the statically
bound
ILoggerFactory instance. |
public static Logger getLogger(String name)
ILoggerFactory
instance.name
- The name of the logger.public static Logger getLogger(Class clazz)
ILoggerFactory
instance.clazz
- the returned logger will be named after clazzpublic static ILoggerFactory getILoggerFactory()
ILoggerFactory
instance in use.
ILoggerFactory instance is bound with this class at compile time.Copyright © 2016 JBoss by Red Hat. All rights reserved.