Package org.apache.logging.log4j.jul
Class AbstractLoggerAdapter
- java.lang.Object
-
- org.apache.logging.log4j.spi.AbstractLoggerAdapter<java.util.logging.Logger>
-
- org.apache.logging.log4j.jul.AbstractLoggerAdapter
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,LoggerAdapter<java.util.logging.Logger>,LoggerContextShutdownAware
- Direct Known Subclasses:
ApiLoggerAdapter,CoreLoggerAdapter
public abstract class AbstractLoggerAdapter extends AbstractLoggerAdapter<java.util.logging.Logger>
Abstract Logger registry. Due to the optionality of using log4j-core, there are two registries available at runtime to create:ApiLoggerAdapterandCoreLoggerAdapter.- Since:
- 2.1
-
-
Field Summary
-
Fields inherited from class org.apache.logging.log4j.spi.AbstractLoggerAdapter
registry
-
-
Constructor Summary
Constructors Constructor Description AbstractLoggerAdapter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected LoggerContextgetContext()Gets theLoggerContextthat should be used to look up or create loggers.-
Methods inherited from class org.apache.logging.log4j.spi.AbstractLoggerAdapter
close, contextShutdown, getContext, getLogger, getLoggerContexts, getLoggersInContext, newLogger
-
-
-
-
Method Detail
-
getContext
protected LoggerContext getContext()
Description copied from class:AbstractLoggerAdapterGets theLoggerContextthat should be used to look up or create loggers. This is similar in spirit to theContextSelectorclass inlog4j-core. However, implementations can rely on their own framework's separation of contexts instead (or simply use a singleton).- Specified by:
getContextin classAbstractLoggerAdapter<java.util.logging.Logger>- Returns:
- the LoggerContext to be used for lookup and creation purposes
- See Also:
LogManager.getContext(ClassLoader, boolean),LogManager.getContext(String, boolean)
-
-