Package ch.qos.logback.classic
Class LoggerContext
- java.lang.Object
-
- ch.qos.logback.core.ContextBase
-
- ch.qos.logback.classic.LoggerContext
-
- All Implemented Interfaces:
Context,LifeCycle,PropertyContainer,ILoggerFactory
@Deprecated(since="2022-01-27") public class LoggerContext extends ContextBase implements ILoggerFactory, LifeCycle
Deprecated.This internal logback API is not supported by AEM as a Cloud Service.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 theILoggerFactoryacting as the manufacturing source ofLoggerinstances.
-
-
Field Summary
Fields Modifier and Type Field Description static booleanDEFAULT_PACKAGING_DATADeprecated.Default setting of packaging data in stack traces
-
Constructor Summary
Constructors Constructor Description LoggerContext()Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaddListener(LoggerContextListener listener)Deprecated.voidaddTurboFilter(TurboFilter newFilter)Deprecated.Loggerexists(java.lang.String name)Deprecated.Check if the named logger exists in the hierarchy.java.util.List<LoggerContextListener>getCopyOfListenerList()Deprecated.java.util.List<java.lang.String>getFrameworkPackages()Deprecated.List of packages considered part of the logging framework such that they are never considered as callers of the logging framework.LoggergetLogger(java.lang.Class<?> clazz)Deprecated.LoggergetLogger(java.lang.String name)Deprecated.Return an appropriateLoggerinstance as specified by thenameparameter.LoggerContextVOgetLoggerContextRemoteView()Deprecated.java.util.List<Logger>getLoggerList()Deprecated.intgetMaxCallerDataDepth()Deprecated.TurboFilterListgetTurboFilterList()Deprecated.booleanisPackagingDataEnabled()Deprecated.voidputProperty(java.lang.String key, java.lang.String val)Deprecated.Set a property of this context.voidremoveListener(LoggerContextListener listener)Deprecated.voidreset()Deprecated.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).voidresetTurboFilterList()Deprecated.First processPriorToRemoval all registered turbo filters and then clear the registration list.voidsetMaxCallerDataDepth(int maxCallerDataDepth)Deprecated.voidsetName(java.lang.String name)Deprecated.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.voidsetPackagingDataEnabled(boolean packagingDataEnabled)Deprecated.voidstart()Deprecated.voidstop()Deprecated.java.lang.StringtoString()Deprecated.-
Methods inherited from class ch.qos.logback.core.ContextBase
addScheduledFuture, getBirthTime, getConfigurationLock, getCopyOfPropertyMap, getExecutorService, getName, getObject, getProperty, getScheduledExecutorService, getScheduledFutures, getStatusManager, isStarted, putObject, register, removeObject, setStatusManager
-
-
-
-
Field Detail
-
DEFAULT_PACKAGING_DATA
public static final boolean DEFAULT_PACKAGING_DATA
Deprecated.Default setting of packaging data in stack traces- See Also:
- Constant Field Values
-
-
Method Detail
-
putProperty
public void putProperty(java.lang.String key, java.lang.String val)Deprecated.Description copied from interface:ContextSet a property of this context.- Specified by:
putPropertyin interfaceContext- Overrides:
putPropertyin classContextBase
-
setName
public void setName(java.lang.String name)
Deprecated.Description copied from class:ContextBaseThe 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.- Specified by:
setNamein interfaceContext- Overrides:
setNamein classContextBase
-
getLogger
public final Logger getLogger(java.lang.Class<?> clazz)
Deprecated.
-
getLogger
public final Logger getLogger(java.lang.String name)
Deprecated.Description copied from interface:ILoggerFactoryReturn an appropriateLoggerinstance as specified by thenameparameter.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.
- Specified by:
getLoggerin interfaceILoggerFactory- Parameters:
name- the name of the Logger to return- Returns:
- a Logger instance
-
exists
public Logger exists(java.lang.String name)
Deprecated.Check if the named logger exists in the hierarchy. If so return its reference, otherwise returnsnull.- Parameters:
name- the name of the logger to search for.
-
getLoggerList
public java.util.List<Logger> getLoggerList()
Deprecated.
-
getLoggerContextRemoteView
public LoggerContextVO getLoggerContextRemoteView()
Deprecated.
-
setPackagingDataEnabled
public void setPackagingDataEnabled(boolean packagingDataEnabled)
Deprecated.
-
isPackagingDataEnabled
public boolean isPackagingDataEnabled()
Deprecated.
-
reset
public void reset()
Deprecated.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). As mentioned above, internal status messages survive resets.- Overrides:
resetin classContextBase
-
getTurboFilterList
public TurboFilterList getTurboFilterList()
Deprecated.
-
addTurboFilter
public void addTurboFilter(TurboFilter newFilter)
Deprecated.
-
resetTurboFilterList
public void resetTurboFilterList()
Deprecated.First processPriorToRemoval all registered turbo filters and then clear the registration list.
-
addListener
public void addListener(LoggerContextListener listener)
Deprecated.
-
removeListener
public void removeListener(LoggerContextListener listener)
Deprecated.
-
getCopyOfListenerList
public java.util.List<LoggerContextListener> getCopyOfListenerList()
Deprecated.
-
start
public void start()
Deprecated.- Specified by:
startin interfaceLifeCycle- Overrides:
startin classContextBase
-
stop
public void stop()
Deprecated.- Specified by:
stopin interfaceLifeCycle- Overrides:
stopin classContextBase
-
toString
public java.lang.String toString()
Deprecated.- Overrides:
toStringin classContextBase
-
getMaxCallerDataDepth
public int getMaxCallerDataDepth()
Deprecated.
-
setMaxCallerDataDepth
public void setMaxCallerDataDepth(int maxCallerDataDepth)
Deprecated.
-
getFrameworkPackages
public java.util.List<java.lang.String> getFrameworkPackages()
Deprecated.List of packages considered part of the logging framework such that they are never considered as callers of the logging framework. This list used to compute the caller for logging events. To designate package "com.foo" as well as all its subpackages as being part of the logging framework, simply add "com.foo" to this list.- Returns:
- list of framework packages
-
-