public class LogContext extends Object
MDC
. This class allows MDC parameters
to be set, and popped back off when the context is finished.Modifier and Type | Method and Description |
---|---|
static LogContext |
create()
Method creates a new log context,
capturing the MDC's current data to be
restored when finish() is called.
|
void |
finish()
Finish the context.
|
void |
put(String key,
String value)
Set a key in the MDC environment.
|
public static LogContext create()
public void put(String key, String value)
key
- The key to set.value
- The key's value.MDC.put(String, String)
public void finish()
Copyright © 2016 GroupLens Research. All rights reserved.