Interface Logger
-
public interface LoggerIn a manner similar to Java logging frameworks such as log4j, DiSCo provides a pluggable interface for attaching named loggers e.g. by following the convention of a named logger per named Class, or by electing arbitrary names. Internally DiSCo constructs instances of Loggers named after its Class names, and by default the logging implementation is a Null Logger which has no-op behaviors. Clients may instantiate an instance of the Logger interface, to direct DiSCo's log to a real logging implementation of their choosing - e.g. a simple wrapper around System.out (provided in the disco.agent.reflect package as a courtesy) or by smarter implementations which use the desired logging framework supplied within the service-under-test.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classLogger.LevelLevels of log, in increasing order of severity
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default voiddebug(java.lang.String message)Log the given message at the DEBUG level of severity.default voiddebug(java.lang.String message, java.lang.Throwable t)Log the given Throwable object with the given Message at the DEBUG level of severity.default voiddebug(java.lang.Throwable t)Log the given Throwable at the DEBUG level of severity.default voiderror(java.lang.String message)Log the given message at the ERROR level of severity.default voiderror(java.lang.String message, java.lang.Throwable t)Log the given Throwable object with the given Message at the ERROR level of severity.default voiderror(java.lang.Throwable t)Log the given Throwable at the ERROR level of severity.default voidfatal(java.lang.String message)Log the given message at the FATAL level of severity.default voidfatal(java.lang.String message, java.lang.Throwable t)Log the given Throwable object with the given Message at the FATAL level of severity.default voidfatal(java.lang.Throwable t)Log the given Throwable at the FATAL level of severity.default voidinfo(java.lang.String message)Log the given message at the INFO level of severity.default voidinfo(java.lang.String message, java.lang.Throwable t)Log the given Throwable object with the given Message at the INFO level of severity.default voidinfo(java.lang.Throwable t)Log the given Throwable at the INFO level of severity.voidlog(Logger.Level level, java.lang.String message)Log the given message of the given severity.voidlog(Logger.Level level, java.lang.String message, java.lang.Throwable t)Log the given Throwable object with the given Message at the given severity.voidlog(Logger.Level level, java.lang.Throwable t)Log the given Throwable object with the given message severity.default voidtrace(java.lang.String message)Log the given message at the TRACE level of severity.default voidtrace(java.lang.String message, java.lang.Throwable t)Log the given Throwable object with the given Message at the TRACE level of severity.default voidtrace(java.lang.Throwable t)Log the given Throwable at the TRACE level of severity.default voidwarn(java.lang.String message)Log the given message at the WARN level of severity.default voidwarn(java.lang.String message, java.lang.Throwable t)Log the given Throwable object with the given Message at the WARN level of severity.default voidwarn(java.lang.Throwable t)Log the given Throwable at the WARN level of severity.
-
-
-
Method Detail
-
log
void log(Logger.Level level, java.lang.String message)
Log the given message of the given severity.- Parameters:
level- the Level of severity of the log content. Can be ignored by implementers as desired, since DiSCo internally will manage aspects of verbositymessage- the message to be logged
-
log
void log(Logger.Level level, java.lang.Throwable t)
Log the given Throwable object with the given message severity.- Parameters:
level- the Level of severity of the log content. Can be ignored by implementers as desired, since DiSCo internally will manage aspects of verbosityt- the Throwable object to be logged
-
log
void log(Logger.Level level, java.lang.String message, java.lang.Throwable t)
Log the given Throwable object with the given Message at the given severity.- Parameters:
level- the Level of severity of the log content. Can be ignored by implementers as desired, since DiSCo internally will manage aspects of verbositymessage- the message to be loggedt- the Throwable object to be logged
-
trace
default void trace(java.lang.String message)
Log the given message at the TRACE level of severity.- Parameters:
message- the message to be logged
-
trace
default void trace(java.lang.Throwable t)
Log the given Throwable at the TRACE level of severity.- Parameters:
t- the Throwable object to be logged
-
trace
default void trace(java.lang.String message, java.lang.Throwable t)Log the given Throwable object with the given Message at the TRACE level of severity.- Parameters:
message- the message to be loggedt- the Throwable object to be logged
-
debug
default void debug(java.lang.String message)
Log the given message at the DEBUG level of severity.- Parameters:
message- the message to be logged
-
debug
default void debug(java.lang.Throwable t)
Log the given Throwable at the DEBUG level of severity.- Parameters:
t- the Throwable object to be logged
-
debug
default void debug(java.lang.String message, java.lang.Throwable t)Log the given Throwable object with the given Message at the DEBUG level of severity.- Parameters:
message- the message to be loggedt- the Throwable object to be logged
-
info
default void info(java.lang.String message)
Log the given message at the INFO level of severity.- Parameters:
message- the message to be logged
-
info
default void info(java.lang.Throwable t)
Log the given Throwable at the INFO level of severity.- Parameters:
t- the Throwable object to be logged
-
info
default void info(java.lang.String message, java.lang.Throwable t)Log the given Throwable object with the given Message at the INFO level of severity.- Parameters:
message- the message to be loggedt- the Throwable object to be logged
-
warn
default void warn(java.lang.String message)
Log the given message at the WARN level of severity.- Parameters:
message- the message to be logged
-
warn
default void warn(java.lang.Throwable t)
Log the given Throwable at the WARN level of severity.- Parameters:
t- the Throwable object to be logged
-
warn
default void warn(java.lang.String message, java.lang.Throwable t)Log the given Throwable object with the given Message at the WARN level of severity.- Parameters:
message- the message to be loggedt- the Throwable object to be logged
-
error
default void error(java.lang.String message)
Log the given message at the ERROR level of severity.- Parameters:
message- the message to be logged
-
error
default void error(java.lang.Throwable t)
Log the given Throwable at the ERROR level of severity.- Parameters:
t- the Throwable object to be logged
-
error
default void error(java.lang.String message, java.lang.Throwable t)Log the given Throwable object with the given Message at the ERROR level of severity.- Parameters:
message- the message to be loggedt- the Throwable object to be logged
-
fatal
default void fatal(java.lang.String message)
Log the given message at the FATAL level of severity.- Parameters:
message- the message to be logged
-
fatal
default void fatal(java.lang.Throwable t)
Log the given Throwable at the FATAL level of severity.- Parameters:
t- the Throwable object to be logged
-
fatal
default void fatal(java.lang.String message, java.lang.Throwable t)Log the given Throwable object with the given Message at the FATAL level of severity.- Parameters:
message- the message to be loggedt- the Throwable object to be logged
-
-