public class LoggingCallback extends CallbackSkeleton
Callback.Event
Constructor and Description |
---|
LoggingCallback() |
Modifier and Type | Method and Description |
---|---|
Level |
getLevel()
Returns the specified log level for messages.
|
Logger |
getLogger()
Returns logger used to log messages.
|
void |
onManagerMessage(String message)
Logs the message on a specified log level.
|
void |
onManagerWarning(String warning,
Exception cause)
Logs the warning on a specified log level.
|
void |
onStopwatchStart(Split split)
Logs Simon start on a specified log level.
|
void |
onStopwatchStop(Split split,
StopwatchSample sample)
Logs Simon stop on a specified log level.
|
void |
setLevel(Level level)
Sets the level that will be used to log messages.
|
void |
setLevel(String level)
Sets the level via level name - used by the configure facility to configure the callback.
|
void |
setLogger(Logger logger)
Sets the logger that will be used to log messages.
|
void |
setLogger(String logger)
Sets the logger by the name of the logger - used by the configure facility to configure the callback.
|
cleanup, initialize, onCounterDecrease, onCounterIncrease, onCounterSet, onManagerClear, onSimonCreated, onSimonDestroyed, onStopwatchAdd
public LoggingCallback()
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 sampled after the stoppublic 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 void setLogger(Logger logger)
logger
- new specified loggerpublic void setLogger(String logger)
logger
- name of the loggerpublic Level getLevel()
public void setLevel(Level level)
level
- log level used to log messagesCopyright © 2019. All rights reserved.