public class LogBridge extends Object
| Constructor and Description |
|---|
LogBridge() |
| Modifier and Type | Method and Description |
|---|---|
static void |
clearMDC()
Clears the DX core SLF4j MDC hashtable.
|
static Map |
getCopyOfContextMap()
Retrieve a copy of the whole DX core SLF4j MDC hashtable
|
static String |
getMDC(String key)
Retrieve an MDC entry from the DX core SLF4j MDC hashtable
|
static void |
log(String loggerName,
int level,
Object message,
Throwable t)
Performs logging of the provided message and exception.
|
static void |
putMDC(String key,
String value)
Put an entry in the DX core SLF4j MDC hashtable
|
static void |
removeMDC(String key)
Remove an entry from the DX core SLF4j MDC hashtable
|
static void |
setContextMap(Map contextMap)
Set the whole DX core SLF4j MDC hashtable to a new map.
|
public static void log(String loggerName, int level, Object message, Throwable t)
loggerName - the name of the loggerlevel - the logging levelmessage - the message to be loggedt - the exception to be loggedpublic static void putMDC(String key, String value)
key - the key name for the entryvalue - the value as a String for the MDC entrypublic static String getMDC(String key)
key - the key name for the entrypublic static void removeMDC(String key)
key - the key name to be removed. If the key doesn't exist this method doesn't do anything.public static void clearMDC()
public static Map getCopyOfContextMap()
public static void setContextMap(Map contextMap)
contextMap - a map that only contains keys and values that are String objectsCopyright © 2004–2020 Jahia Solutions Group SA. All rights reserved.