Package org.javalite.logging
Class Context
java.lang.Object
org.javalite.logging.Context
Serves mostly to pass name and values from any code down to the logging system to be included on
every log line by a current thread.. till cleared.
- Author:
- igor on 2/5/17.
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
Context
public Context()
-
-
Method Details
-
put
Add multiple values in a classical JavaLite style.- Parameters:
namesAndValues
- names and values (must pass even number).
-
clear
public static void clear()Clears current context of any values. Usually this is called at the end of a web request or the end of some processing unit. -
toJSON
- Returns:
- JSON representation of context. Expect a JSON object
"{...}"
if values are present, ornull
if no values were set.
-