public class AsyncLoggerContext extends LoggerContext
LoggerContext
that creates AsyncLogger
objects.LifeCycle.State
PROPERTY_CONFIG
LOGGER
Constructor and Description |
---|
AsyncLoggerContext(String name) |
AsyncLoggerContext(String name,
Object externalContext) |
AsyncLoggerContext(String name,
Object externalContext,
String configLocn) |
AsyncLoggerContext(String name,
Object externalContext,
URI configLocn) |
Modifier and Type | Method and Description |
---|---|
RingBufferAdmin |
createRingBufferAdmin()
Creates and returns a new
RingBufferAdmin that instruments the ringbuffer of the AsyncLogger
objects in this LoggerContext . |
protected Logger |
newInstance(LoggerContext ctx,
String name,
MessageFactory messageFactory) |
void |
setName(String name)
Sets the name.
|
void |
setUseThreadLocals(boolean useThreadLocals)
Signals this context whether it is allowed to use ThreadLocal objects for efficiency.
|
void |
start() |
void |
start(Configuration config)
Starts with a specific configuration.
|
void |
stop() |
addFilter, addPropertyChangeListener, getConfigLocation, getConfiguration, getContext, getContext, getContext, getExternalContext, getLogger, getLogger, getLoggers, getName, getRootLogger, hasLogger, hasLogger, hasLogger, onChange, reconfigure, removeFilter, removePropertyChangeListener, setConfigLocation, setExternalContext, updateLoggers, updateLoggers
equalsImpl, getState, hashCodeImpl, initialize, isInitialized, isStarted, isStarting, isStopped, isStopping, setStarted, setStarting, setState, setStopped, setStopping
public AsyncLoggerContext(String name)
protected Logger newInstance(LoggerContext ctx, String name, MessageFactory messageFactory)
newInstance
in class LoggerContext
public void setName(String name)
LoggerContext
setName
in class LoggerContext
name
- the new LoggerContext namepublic void start()
start
in interface LifeCycle
start
in class LoggerContext
public void start(Configuration config)
LoggerContext
start
in class LoggerContext
config
- The new Configuration.public void stop()
stop
in interface LifeCycle
stop
in class LoggerContext
public RingBufferAdmin createRingBufferAdmin()
RingBufferAdmin
that instruments the ringbuffer of the AsyncLogger
objects in this LoggerContext
.RingBufferAdmin
that instruments the ringbufferpublic void setUseThreadLocals(boolean useThreadLocals)
useThreadLocals
- whether this context is allowed to use ThreadLocal objectsCopyright © 1999-2017 Apache Software Foundation. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.