public interface LoggerProvider
Modifier and Type | Method and Description |
---|---|
void |
clearMdc()
Removes all entries from the message diagnostics context.
|
void |
clearNdc()
Clears the nested diagnostics context.
|
Logger |
getLogger(String name)
Returns a logger which is backed by a logger from the log provider.
|
Object |
getMdc(String key)
Returns the value for the key on the message diagnostics context or
null if no value was found. |
Map<String,Object> |
getMdcMap()
Returns the map from the context.
|
String |
getNdc()
Retrieves the current values set for the nested diagnostics context.
|
int |
getNdcDepth()
The current depth of the nested diagnostics context.
|
String |
peekNdc()
Peeks at the top value from the stack and returns it.
|
String |
popNdc()
Pops top value from the stack and returns it.
|
void |
pushNdc(String message)
Pushes a value to the nested diagnostics context stack.
|
Object |
putMdc(String key,
Object value)
Puts the value onto the message diagnostics context.
|
void |
removeMdc(String key)
Removes the value from the message diagnostics context.
|
void |
setNdcMaxDepth(int maxDepth)
Sets maximum depth of the stack removing any entries below the maximum depth.
|
Logger getLogger(String name)
Note: this should never be null
name
- the name of the loggervoid clearMdc()
Object putMdc(String key, Object value)
key
- the key for the valuevalue
- the valuenull
if no value was setObject getMdc(String key)
null
if no value was found.key
- the key to lookup the value fornull
if not foundvoid removeMdc(String key)
key
- the key of the value to removeMap<String,Object> getMdcMap()
Note that in most implementations this is an expensive operation and should be used sparingly.
null
void clearNdc()
String getNdc()
null
if no value was setint getNdcDepth()
String popNdc()
String peekNdc()
void pushNdc(String message)
message
- the message to pushvoid setNdcMaxDepth(int maxDepth)
maxDepth
- the maximum depth to setCopyright © 2016 JBoss by Red Hat. All rights reserved.