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

## Field Summary

### Fields inherited from class ch.qos.logback.core.spi.ContextAwareBase

`context`

## Constructor Summary

Constructors
Constructor
Description
`LoggerContextAwareBase()`

## Method Summary

Modifier and Type
Method
Description
`LoggerContext`
`getLoggerContext()`
Return the `LoggerContext` this component is attached to.
`void`
`setContext(Context context)`
`void`
`setLoggerContext(LoggerContext context)`
Set the owning context.

### Methods inherited from class ch.qos.logback.core.spi.ContextAwareBase

`addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getDeclaredOrigin, getStatusManager`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, 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`

## Constructor Details

### LoggerContextAwareBase

public LoggerContextAwareBase()

## Method Details

### setLoggerContext

public void setLoggerContext(LoggerContext context)
Set the owning context. The owning context cannot be set more than once.

Specified by:
  `setLoggerContext` in interface `LoggerContextAware`
Parameters:
  `context` - The context where this component is attached.

### setContext

public void setContext(Context context)

Specified by:
  `setContext` in interface `ContextAware`
Overrides:
  `setContext` in class `ContextAwareBase`

### getLoggerContext

public LoggerContext getLoggerContext()
Return the `LoggerContext` this component is attached to.

Returns:
  The owning LoggerContext