|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectLoggerFactory<Logger>
Log4JLoggerFactory
public class Log4JLoggerFactory
A factory for loggers that redirect all Java logging events to the Apache's Log4J framework.
modules/library/metadata (gt-metadata.jar)
Constructor Summary | |
---|---|
protected |
Log4JLoggerFactory()
Constructs a default factory. |
Method Summary | |
---|---|
protected Logger |
getImplementation(String name)
Returns the implementation to use for the logger of the specified name, or null if the logger would delegates to Java logging anyway. |
static Log4JLoggerFactory |
getInstance()
Returns the unique instance of this factory. |
protected Logger |
unwrap(Logger logger)
Returns the implementation wrapped by the specified logger, or null if none. |
protected Logger |
wrap(String name,
Logger implementation)
Wraps the specified implementation in a Java logger. |
Methods inherited from class LoggerFactory |
---|
getImplementationClass, getLogger |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected Log4JLoggerFactory() throws NoClassDefFoundError
NoClassDefFoundError
- if Apache's Log
class was not found on the classpath.Method Detail |
---|
public static Log4JLoggerFactory getInstance() throws NoClassDefFoundError
NoClassDefFoundError
- if Apache's Log
class was not found on the classpath.protected Logger getImplementation(String name)
null
if the logger would delegates to Java logging anyway.
getImplementation
in class LoggerFactory<Logger>
name
- The name of the logger.
null
if the target framework would redirect
to the Java logging framework.protected Logger wrap(String name, Logger implementation)
wrap
in class LoggerFactory<Logger>
name
- The name of the logger.implementation
- An implementation returned by LoggerFactory.getImplementation(java.lang.String)
.
protected Logger unwrap(Logger logger)
null
if none.
unwrap
in class LoggerFactory<Logger>
logger
- The logger to test.
null
if none.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |