| java.lang.Object org.geotools.util.logging.LoggerFactory
All known Subclasses: org.geotools.util.logging.CommonsLoggerFactory, org.geotools.util.logging.Log4JLoggerFactory,
LoggerFactory | abstract public class LoggerFactory (Code) | | A factory for Java
Logger wrapping an other logging framework. This factory is used
only when wanting to log to an other framework than Java logging. The
LoggerFactory.getLogger method returns some subclass of
Logger (typicallly
LoggerAdapter ) that
forward directly all log methods to an other framework.
since: 2.4 version: $Id: LoggerFactory.java 27891 2007-11-14 14:10:48Z desruisseaux $ author: Martin Desruisseaux See Also: Logging See Also: LoggerAdapter |
LoggerFactory | protected LoggerFactory(Class loggerClass)(Code) | | Creates a new factory.
Parameters: loggerClass - The class of the wrapped logger. |
getImplementation | abstract protected Object getImplementation(String name)(Code) | | Returns the implementation to use for the logger of the specified name. The object to be
returned depends on the logging framework (Log4J, SLF4J, etc.). If the target
framework redirects logging events to Java logging, then this method should returns
null since we should not use wrapper at all.
Parameters: name - The name of the logger. The logger as an object of the target logging framework (Log4J, SLF4J,etc.), or null if the target framework would redirectto the Java logging framework. |
getImplementationClass | public Class getImplementationClass()(Code) | | Returns the base class of objects to be returned by
LoggerFactory.getImplementation . The
class depends on the underlying logging framework (Log4J, SLF4J, etc.).
|
getLogger | public Logger getLogger(String name)(Code) | | Returns the logger of the specified name, or
null . If this method has already been
invoked previously with the same
name argument, then it may returns the same logger
provided that:
- the logger has not yet been garbage collected;
- the implementation instance (Log4J, SLF4J, etc.) returned by
(name) has
not changed.
Otherwise this method returns a new
Logger instance, or
null if the
standard Java logging framework should be used.
Parameters: name - The name of the logger. The logger, or null . |
unwrap | abstract protected Object unwrap(Logger logger)(Code) | | Returns the
wrapped by the specified logger,
or
null if none. If the specified logger is not an instance of the expected class,
then this method should returns
null .
Parameters: logger - The logger to test. The implementation wrapped by the specified logger, or null if none. |
|
|