public abstract class Logging extends Object
Modifier and Type | Class and Description |
---|---|
static class |
Logging.MDCCloseable
An adapter to restore the MDC context when done.
|
Modifier and Type | Field and Description |
---|---|
static String |
PREFIX_KEY |
Constructor and Description |
---|
Logging() |
Modifier and Type | Method and Description |
---|---|
static Map<String,String> |
getCopyOfContextMap() |
static Runnable |
preserve(Runnable runnable) |
static void |
putPrefix(String name) |
static void |
putThreadContext(String key,
String value) |
static void |
setContextMap(Map<String,String> mdc) |
static Logging.MDCCloseable |
withContextMapCloseable(Map<String,String> contextMap) |
static <T> T |
withPrefix(String prefix,
Callable<T> callable) |
static void |
withPrefix(String prefix,
Runnable runnable) |
static Logging.MDCCloseable |
withPrefixCloseable(String prefix) |
public static final String PREFIX_KEY
public static <T> T withPrefix(String prefix, Callable<T> callable) throws Exception
Exception
public static Logging.MDCCloseable withPrefixCloseable(String prefix)
public static Logging.MDCCloseable withContextMapCloseable(Map<String,String> contextMap)
public static void putPrefix(String name)
Copyright © 2021. All rights reserved.