public class CommonsLoggerFactory extends LoggerFactory<Log>
Out of the box commons logging delegates to the java util logging framework (using the class
org.apache.commons.logging.impl.Jdk14Logger). If this factory detects Commons logging is already
delegating to Jdk14Logger it will return null
allowing java util logging directly.
Modifier | Constructor and Description |
---|---|
protected |
CommonsLoggerFactory()
Constructs a default factory.
|
Modifier and Type | Method and Description |
---|---|
protected Log |
getImplementation(String name)
Returns the implementation to use for the logger of the specified name, or
null if
the logger would delegate to Java logging anyway. |
static CommonsLoggerFactory |
getInstance()
Returns the unique instance of this factory.
|
String |
lookupConfiguration()
Look up configuration information, or
null unknown. |
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.
|
getImplementationClass, getLogger
protected CommonsLoggerFactory() throws NoClassDefFoundError
NoClassDefFoundError
- if Apache's Log
class was not found on the classpath.public static CommonsLoggerFactory getInstance() throws NoClassDefFoundError
NoClassDefFoundError
- if Apache's Log
class was not found on the classpath.protected Log getImplementation(String name)
null
if
the logger would delegate 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.public String lookupConfiguration()
LoggerFactory
null
unknown.
Report back details on how logging configuration is setup. Ideally including configuration filename along with any system properties used.
lookupConfiguration
in class LoggerFactory<Log>
null
unknown.Copyright © 1996–2023 Geotools. All rights reserved.