public class DC extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
DC.RestoreHandle |
static class |
DC.State
Container for thread diagnostic context state.
|
Modifier and Type | Field and Description |
---|---|
static String |
KEY
The key in which we publish our contents to in the Slf4j MDC.
|
static String |
PREFIX
String prefixed to MDC value when there is content to publish.
|
static String |
SEPARATOR
String used to separate the stack and context values when both are present.
|
Constructor and Description |
---|
DC() |
Modifier and Type | Method and Description |
---|---|
static String |
get(Class key) |
static String |
get(Object key) |
static DC.State |
getState()
Get a copy of the state for the current thread.
|
static DC.RestoreHandle |
install(Class key,
Object value) |
static DC.RestoreHandle |
install(Object key,
Object value) |
static String |
peek() |
static String |
pop() |
static void |
push(Object value) |
static void |
put(Class key,
Object value) |
static void |
put(Object key,
Object value) |
static void |
remove(Class key) |
static void |
remove(Object key) |
static StringBuilder |
render()
Render the current threads state.
|
static void |
reset()
Reset the current threads state.
|
static void |
setState(DC.State state)
Set the state for the current thread.
|
public static final String KEY
public static final String PREFIX
public static final String SEPARATOR
public static DC.State getState()
public static void setState(DC.State state)
public static void reset()
public static StringBuilder render()
public static DC.RestoreHandle install(Object key, Object value)
public static DC.RestoreHandle install(Class key, Object value)
public static void remove(Object key)
public static void remove(Class key)
public static void push(Object value)
public static String pop()
public static String peek()
Copyright © 2016. All rights reserved.