|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.confluence.util.logging.LoggingContext
public final class LoggingContext
Manages contextual information in the Log4J Mapped Diagnostic Context.
PatternLayoutWithContext,
LoggingContextFilter,
MDC| Method Summary | |
|---|---|
static void |
clear()
Removes all keys from the logging context which are managed by this class. |
static void |
clearAll()
Clears all MDC information on the current thread. |
static Map<String,Object> |
getContext()
Returns an immutable copy of the underlying logging context map. |
static String |
getUserName()
Returns the currently mapped 'userName' value from the context, or null if none has been
set. |
static boolean |
isEmpty()
Returns true if the logging context has been initialised and has data in it, otherwise
false. |
static void |
put(String key,
String value)
Sets the value associated with the key in the logging context, overwriting any existing value. |
static void |
remove(String... keys)
Removes any value associated with the keys in the logging context. |
static void |
setReferer(String referer)
Sets the 'referer' value in the logging context. |
static void |
setUrl(String url)
Sets the 'url' value in the logging context. |
static void |
setUserName(String userName)
Sets the 'userName' value in the logging context. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static void setUrl(String url)
null.
public static void setUserName(String userName)
null.
public static String getUserName()
null if none has been
set.
public static void setReferer(String referer)
null.
public static void put(String key,
String value)
remove(java.lang.String...) with the same key in a finally block.
MDC.put(java.lang.String, java.lang.Object)public static void remove(String... keys)
public static boolean isEmpty()
true if the logging context has been initialised and has data in it, otherwise
false.
public static Map<String,Object> getContext()
public static void clear()
put(java.lang.String, java.lang.String) needs to be removed by calling remove(java.lang.String...) with the same
key.
public static void clearAll()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||