public class LoggerContext extends ContextBase implements ILoggerFactory, LifeCycle
ILoggerFactory
acting as the
manufacturing source of Logger
instances.Modifier and Type | Field and Description |
---|---|
static boolean |
DEFAULT_PACKAGING_DATA
Default setting of packaging data in stack traces
|
Constructor and Description |
---|
LoggerContext() |
Modifier and Type | Method and Description |
---|---|
void |
addListener(LoggerContextListener listener) |
void |
addTurboFilter(TurboFilter newFilter) |
Logger |
exists(java.lang.String name)
Check if the named logger exists in the hierarchy.
|
java.util.List<LoggerContextListener> |
getCopyOfListenerList() |
java.util.List<java.lang.String> |
getFrameworkPackages()
List of packages considered part of the logging framework such that they are never considered
as callers of the logging framework.
|
Logger |
getLogger(java.lang.Class<?> clazz) |
Logger |
getLogger(java.lang.String name)
Return an appropriate
Logger instance as specified by the
name parameter. |
LoggerContextVO |
getLoggerContextRemoteView() |
java.util.List<Logger> |
getLoggerList() |
int |
getMaxCallerDataDepth() |
TurboFilterList |
getTurboFilterList() |
boolean |
isPackagingDataEnabled() |
void |
putProperty(java.lang.String key,
java.lang.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 processPriorToRemoval all registered turbo filters and then clear the registration
list.
|
void |
setMaxCallerDataDepth(int maxCallerDataDepth) |
void |
setName(java.lang.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() |
java.lang.String |
toString() |
addScheduledFuture, getBirthTime, getConfigurationLock, getCopyOfPropertyMap, getExecutorService, getName, getObject, getProperty, getScheduledExecutorService, getScheduledFutures, getStatusManager, isStarted, putObject, register, removeObject, setStatusManager
public static final boolean DEFAULT_PACKAGING_DATA
public void putProperty(java.lang.String key, java.lang.String val)
Context
putProperty
in interface Context
putProperty
in class ContextBase
public void setName(java.lang.String name)
ContextBase
setName
in interface Context
setName
in class ContextBase
public final Logger getLogger(java.lang.Class<?> clazz)
public final Logger getLogger(java.lang.String name)
ILoggerFactory
Logger
instance as specified by the
name
parameter.
If the name parameter is equal to Logger.ROOT_LOGGER_NAME
, that is
the string value "ROOT" (case insensitive), then the root logger of the
underlying logging system is returned.
Null-valued name arguments are considered invalid.
Certain extremely simple logging systems, e.g. NOP, may always return the same logger instance regardless of the requested name.
getLogger
in interface ILoggerFactory
name
- the name of the Logger to returnpublic Logger exists(java.lang.String name)
null
.name
- the name of the logger to search for.public java.util.List<Logger> getLoggerList()
public LoggerContextVO getLoggerContextRemoteView()
public void setPackagingDataEnabled(boolean packagingDataEnabled)
public boolean isPackagingDataEnabled()
public void reset()
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 java.util.List<LoggerContextListener> getCopyOfListenerList()
public void start()
start
in interface LifeCycle
start
in class ContextBase
public void stop()
stop
in interface LifeCycle
stop
in class ContextBase
public java.lang.String toString()
toString
in class ContextBase
public int getMaxCallerDataDepth()
public void setMaxCallerDataDepth(int maxCallerDataDepth)
public java.util.List<java.lang.String> getFrameworkPackages()
Copyright © 2010 - 2020 Adobe. All Rights Reserved