|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
ObjectLoggerFactory<Log>
CommonsLoggerFactory
public class CommonsLoggerFactory
A factory for loggers that redirect all Java logging events to the Apache Commons-logging framework.
It is not necessary to use this class directly. The Geotk library will use this factory
automatically if the geotk-logging-commons.jar file is present on the classpath.
| utility/geotk-logging-commons (download) | View source code for this class |
| Field Summary |
|---|
| Fields inherited from class LoggerFactory |
|---|
COMMONS_LOGGING, LOG4J |
| Constructor Summary | |
|---|---|
CommonsLoggerFactory()
Constructs a default factory. |
|
| Method Summary | |
|---|---|
protected Log |
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 CommonsLoggerFactory |
getInstance()
Deprecated. Replaced by the META-INF/services discovery mechanism. |
protected Log |
unwrap(Logger logger)
Returns the implementation wrapped by the specified logger, or null if none. |
protected Logger |
wrap(String name,
Log 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 |
|---|
public CommonsLoggerFactory()
throws NoClassDefFoundError
NoClassDefFoundError - if Apache Log class was not found on the classpath.| Method Detail |
|---|
@Deprecated
public static CommonsLoggerFactory getInstance()
throws NoClassDefFoundError
META-INF/services discovery mechanism.
NoClassDefFoundError - if Apache Log class was not found on the classpath.protected Log getImplementation(String name)
null if the logger would delegates to Java logging anyway.
getImplementation in class LoggerFactory<Log>name - The name of the logger.
null if the target framework would redirect
to the Java logging framework.
protected Logger wrap(String name,
Log implementation)
wrap in class LoggerFactory<Log>name - The name of the logger.implementation - An implementation returned by LoggerFactory.getImplementation(java.lang.String).
protected Log unwrap(Logger logger)
null if none.
unwrap in class LoggerFactory<Log>logger - The logger to test.
null if none.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||