Package org.apache.logging.log4j.jpl
Class Log4jSystemLoggerAdapter
java.lang.Object
org.apache.logging.log4j.spi.AbstractLoggerAdapter<System.Logger>
org.apache.logging.log4j.jpl.Log4jSystemLoggerAdapter
- All Implemented Interfaces:
Closeable,AutoCloseable,LoggerAdapter<System.Logger>,LoggerContextShutdownAware
System.Logger registry implementation using just log4j-api.- Since:
- 2.14
-
Field Summary
Fields inherited from class org.apache.logging.log4j.spi.AbstractLoggerAdapter
registry -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected LoggerContextGets theLoggerContextthat should be used to look up or create loggers.protected System.LoggernewLogger(String name, LoggerContext context) Creates a new named logger for a givenLoggerContext.Methods inherited from class org.apache.logging.log4j.spi.AbstractLoggerAdapter
close, contextShutdown, getContext, getLogger, getLoggerContexts, getLoggersInContext
-
Constructor Details
-
Log4jSystemLoggerAdapter
public Log4jSystemLoggerAdapter()
-
-
Method Details
-
newLogger
Description copied from class:AbstractLoggerAdapterCreates a new named logger for a givenLoggerContext.- Specified by:
newLoggerin classAbstractLoggerAdapter<System.Logger>- Parameters:
name- the name of the logger to createcontext- the LoggerContext this logger will be associated with- Returns:
- the new named logger
-
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<System.Logger>- Returns:
- the LoggerContext to be used for lookup and creation purposes
- See Also:
-