|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.javasimon.callback.CallbackSkeleton
org.javasimon.utils.LoggingCallback
public class LoggingCallback
LoggingCallback logs events via JDK logging API.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.javasimon.callback.Callback |
|---|
Callback.Event |
| Field Summary | |
|---|---|
private Level |
level
|
private Logger |
logger
|
| Constructor Summary | |
|---|---|
LoggingCallback()
|
|
| Method Summary | |
|---|---|
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 sprecified 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. |
| Methods inherited from class org.javasimon.callback.CallbackSkeleton |
|---|
cleanup, initialize, onCounterDecrease, onCounterIncrease, onCounterSet, onManagerClear, onSimonCreated, onSimonDestroyed, onSimonReset, onStopwatchAdd, onStopwatchAdd |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private Logger logger
private Level level
| Constructor Detail |
|---|
public LoggingCallback()
| Method Detail |
|---|
public void onStopwatchStart(Split split)
onStopwatchStart in interface CallbackonStopwatchStart in class CallbackSkeletonsplit - started Split
public void onStopwatchStop(Split split,
StopwatchSample sample)
onStopwatchStop in interface CallbackonStopwatchStop in class CallbackSkeletonsplit - stopped Splitsample - stopwatch sampled after the stop
public void onManagerWarning(String warning,
Exception cause)
onManagerWarning in interface CallbackonManagerWarning in class CallbackSkeletonwarning - warning messagecause - throwable causepublic void onManagerMessage(String message)
onManagerMessage in interface CallbackonManagerMessage in class CallbackSkeletonmessage - messagepublic Logger getLogger()
public 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 messagespublic void setLevel(String level)
level - name of the level
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||