public final class ThreadLocalLogContextSelector extends Object implements LogContextSelector
Constructor and Description |
---|
ThreadLocalLogContextSelector(LogContextSelector delegate)
Construct a new instance.
|
ThreadLocalLogContextSelector(Object securityKey,
LogContextSelector delegate)
Construct a new instance.
|
Modifier and Type | Method and Description |
---|---|
LogContext |
getAndSet(Object securityKey,
LogContext newValue)
Get and set the log context.
|
LogContext |
getLogContext()
Get the current log context.
|
public ThreadLocalLogContextSelector(LogContextSelector delegate)
delegate
- the selector to delegate to if no context is chosenpublic ThreadLocalLogContextSelector(Object securityKey, LogContextSelector delegate)
securityKey
- the security key required to push or pop a log context.delegate
- the selector to delegate to if no context is chosenpublic LogContext getLogContext()
LogContextSelector
getLogContext
in interface LogContextSelector
public LogContext getAndSet(Object securityKey, LogContext newValue)
securityKey
- the security key to check (ignored if none was set on construction)newValue
- the new log context value, or null
to clearnull
if none was setCopyright © 2017 JBoss by Red Hat. All rights reserved.