Package ch.qos.logback.classic.spi
Class LoggerContextAwareBase
- java.lang.Object
-
- ch.qos.logback.core.spi.ContextAwareBase
-
- ch.qos.logback.classic.spi.LoggerContextAwareBase
-
- All Implemented Interfaces:
LoggerContextAware,ContextAware
public class LoggerContextAwareBase extends ContextAwareBase implements LoggerContextAware
-
-
Constructor Summary
Constructors Constructor Description LoggerContextAwareBase()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LoggerContextgetLoggerContext()Return theLoggerContextthis component is attached to.voidsetContext(Context context)voidsetLoggerContext(LoggerContext context)Set the owning context.-
Methods inherited from class ch.qos.logback.core.spi.ContextAwareBase
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getStatusManager
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface ch.qos.logback.core.spi.ContextAware
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext
-
-
-
-
Method Detail
-
setLoggerContext
public void setLoggerContext(LoggerContext context)
Set the owning context. The owning context cannot be set more than once.- Specified by:
setLoggerContextin interfaceLoggerContextAware- Parameters:
context- The context where this component is attached.
-
setContext
public void setContext(Context context)
- Specified by:
setContextin interfaceContextAware- Overrides:
setContextin classContextAwareBase
-
getLoggerContext
public LoggerContext getLoggerContext()
Return theLoggerContextthis component is attached to.- Returns:
- The owning LoggerContext
-
-