| Modifier and Type | Field and Description |
|---|---|
| private final ThreadLocal | |
| private final LogContextSelector | |
| private final Object |
| Access | Constructor and Description |
|---|---|
| public | ThreadLocalLogContextSelector(final LogContextSelector
the selector to delegate to if no context is chosen delegate)Construct a new instance. |
| public | ThreadLocalLogContextSelector(final Object
the security key required to push or pop a log context. securityKey, final LogContextSelector the selector to delegate to if no context is chosen delegate)Construct a new instance. |
| Modifier and Type | Method and Description |
|---|---|
| public LogContext | Returns: the previous log context value, ornull if none was setthe security key to check (ignored if none was set on construction) securityKey, LogContext the new log context value, or newValue)null to clearGet and set the log context. |
| public LogContext | getLogContext()
Implements org. Get the current log context. |
| context | back to summary |
|---|---|
| private final ThreadLocal<LogContext> context | |
| delegate | back to summary |
|---|---|
| private final LogContextSelector delegate | |
| securityKey | back to summary |
|---|---|
| private final Object securityKey | |
| ThreadLocalLogContextSelector | back to summary |
|---|---|
| public ThreadLocalLogContextSelector(final LogContextSelector delegate) Construct a new instance.
| |
| ThreadLocalLogContextSelector | back to summary |
|---|---|
| public ThreadLocalLogContextSelector(final Object securityKey, final LogContextSelector delegate) Construct a new instance.
| |
| getAndSet | back to summary |
|---|---|
| public LogContext getAndSet(Object securityKey, LogContext newValue) Get and set the log context.
| |
| getLogContext | back to summary |
|---|---|
| public LogContext getLogContext() Implements org. Doc from org. Get the current log context.
| |