public class SLF4JLoggingCallback extends CallbackSkeleton
Callback.Event
Constructor and Description |
---|
SLF4JLoggingCallback() |
Modifier and Type | Method and Description |
---|---|
org.slf4j.Logger |
getLogger()
Returns logger used to log messages.
|
org.slf4j.Marker |
getMarker()
Returns the specified log marker for messages.
|
void |
onManagerMessage(String message)
Logs the message on a specified log marker.
|
void |
onManagerWarning(String warning,
Exception cause)
Logs the warning on a specified log marker.
|
void |
onStopwatchStart(Split split)
Logs Simon start on a specified log marker.
|
void |
onStopwatchStop(Split split,
StopwatchSample sample)
Logs Simon stop on a specified log marker.
|
void |
setLogger(org.slf4j.Logger logger)
Sets the logger that will be used to log messages.
|
void |
setMarker(org.slf4j.Marker marker)
Sets the marker that will be used to log messages.
|
void |
setMarker(String marker)
Sets the marker via marker name - used by the configure facility to configure the callback.
|
cleanup, initialize, onCounterDecrease, onCounterIncrease, onCounterSet, onManagerClear, onSimonCreated, onSimonDestroyed, onStopwatchAdd
public SLF4JLoggingCallback()
public void onStopwatchStart(Split split)
onStopwatchStart
in interface Callback
onStopwatchStart
in class CallbackSkeleton
split
- started splitpublic void onStopwatchStop(Split split, StopwatchSample sample)
onStopwatchStop
in interface Callback
onStopwatchStop
in class CallbackSkeleton
split
- stopped splitsample
- stopwatch samplepublic void onManagerWarning(String warning, Exception cause)
onManagerWarning
in interface Callback
onManagerWarning
in class CallbackSkeleton
warning
- warning messagecause
- throwable causepublic void onManagerMessage(String message)
onManagerMessage
in interface Callback
onManagerMessage
in class CallbackSkeleton
message
- messagepublic org.slf4j.Logger getLogger()
public void setLogger(org.slf4j.Logger logger)
logger
- new specified loggerpublic org.slf4j.Marker getMarker()
public void setMarker(org.slf4j.Marker marker)
marker
- log marker used to log messagesCopyright © 2019. All rights reserved.