|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectch.qos.logback.core.ContextBase
ch.qos.logback.classic.LoggerContext
public class LoggerContext
LoggerContext glues many of the logback-classic components together. In
principle, every logback-classic component instance is attached either
directly or indirectly to a LoggerContext instance. Just as importantly
LoggerContext implements the ILoggerFactory
acting as the
manufacturing source of Logger
instances.
Constructor Summary | |
---|---|
LoggerContext()
|
Method Summary | |
---|---|
void |
addListener(LoggerContextListener listener)
|
void |
addTurboFilter(TurboFilter newFilter)
|
Logger |
exists(String name)
Check if the named logger exists in the hierarchy. |
List<LoggerContextListener> |
getCopyOfListenerList()
|
Logger |
getLogger(Class clazz)
|
Logger |
getLogger(String name)
|
LoggerContextVO |
getLoggerContextRemoteView()
|
List<Logger> |
getLoggerList()
|
int |
getMaxCallerDataDepth()
|
TurboFilterList |
getTurboFilterList()
|
boolean |
isPackagingDataEnabled()
|
boolean |
isStarted()
|
void |
putProperty(String key,
String val)
Set a property of this context. |
void |
removeListener(LoggerContextListener listener)
|
void |
reset()
This method clears all internal properties, except internal status messages, closes all appenders, removes any turboFilters, fires an OnReset event, removes all status listeners, removes all context listeners (except those which are reset resistant). |
void |
resetTurboFilterList()
First stop all registered turbo filters and then clear the registration list. |
void |
setMaxCallerDataDepth(int maxCallerDataDepth)
|
void |
setName(String name)
The context name can be set only if it is not already set, or if the current name is the default context name, namely "default", or if the current name and the old name are the same. |
void |
setPackagingDataEnabled(boolean packagingDataEnabled)
|
void |
start()
|
void |
stop()
|
String |
toString()
|
Methods inherited from class ch.qos.logback.core.ContextBase |
---|
getBirthTime, getConfigurationLock, getCopyOfPropertyMap, getExecutorService, getName, getObject, getProperty, getStatusManager, putObject, setStatusManager |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public LoggerContext()
Method Detail |
---|
public void putProperty(String key, String val)
Context
putProperty
in interface Context
putProperty
in class ContextBase
public void setName(String name)
ContextBase
setName
in interface Context
setName
in class ContextBase
public final Logger getLogger(Class clazz)
public final Logger getLogger(String name)
getLogger
in interface org.slf4j.ILoggerFactory
public Logger exists(String name)
null
.
name
- the name of the logger to search for.public List<Logger> getLoggerList()
public LoggerContextVO getLoggerContextRemoteView()
public void setPackagingDataEnabled(boolean packagingDataEnabled)
public boolean isPackagingDataEnabled()
public void reset()
As mentioned above, internal status messages survive resets.
reset
in class ContextBase
public TurboFilterList getTurboFilterList()
public void addTurboFilter(TurboFilter newFilter)
public void resetTurboFilterList()
public void addListener(LoggerContextListener listener)
public void removeListener(LoggerContextListener listener)
public List<LoggerContextListener> getCopyOfListenerList()
public boolean isStarted()
isStarted
in interface LifeCycle
public void start()
start
in interface LifeCycle
public void stop()
stop
in interface LifeCycle
public String toString()
toString
in class ContextBase
public int getMaxCallerDataDepth()
public void setMaxCallerDataDepth(int maxCallerDataDepth)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |