Package science.aist.seshat
Interface Logger
-
public interface Logger
Interface for a logger
- Since:
- 1.0
- Author:
- Oliver Krauss, Andreas Pointner
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default void
debug(Exception e)
Logs the given exception withLogLevel.DEBUG
default void
debug(Object o)
Logs the given object withLogLevel.DEBUG
default void
debug(String s)
Logs the given string withLogLevel.DEBUG
default void
debug(String s, Exception e)
Logs the given string with an exception withLogLevel.DEBUG
default void
debug(String s, Object... replacements)
Log the given string, and replaces every "{}" with the correct replacements withLogLevel.DEBUG
default void
error(Exception e)
Logs the given exception withLogLevel.ERROR
default void
error(Object o)
Logs the given object withLogLevel.ERROR
default void
error(String s)
Logs the given string withLogLevel.ERROR
default void
error(String s, Exception e)
Logs the given string with an exception withLogLevel.ERROR
default void
error(String s, Object... replacements)
Log the given string, and replaces every "{}" with the correct replacements withLogLevel.ERROR
static Logger
getInstance()
Returns a Logger instancestatic Logger
getInstance(Class<?> clazz)
Returns a logger instancestatic Logger
getInstance(Object objectForClazz)
Returns a logger instancedefault void
info(Exception e)
Logs the given exception withLogLevel.INFO
default void
info(Object o)
Logs the given object withLogLevel.INFO
default void
info(String s)
Logs the given string withLogLevel.INFO
default void
info(String s, Exception e)
Logs the given string with an exception withLogLevel.INFO
default void
info(String s, Object... replacements)
Log the given string, and replaces every "{}" with the correct replacements withLogLevel.INFO
void
log(LogLevel level, Exception e)
Logs the given exceptiondefault void
log(LogLevel level, Object object)
Logs the given object by using toString methodvoid
log(LogLevel level, String s)
Logs the given stringvoid
log(LogLevel level, String s, Exception e)
Logs the given string with an exceptionvoid
log(LogLevel level, String s, Object... replacements)
Log the given string, and replaces every "{}" with the correct replacementsdefault void
trace(Exception e)
Logs the given exception withLogLevel.TRACE
default void
trace(Object o)
Logs the given object withLogLevel.TRACE
default void
trace(String s)
Logs the given string withLogLevel.TRACE
default void
trace(String s, Exception e)
Logs the given string with an exception withLogLevel.TRACE
default void
trace(String s, Object... replacements)
Log the given string, and replaces every "{}" with the correct replacements withLogLevel.TRACE
default void
warn(Exception e)
Logs the given exception withLogLevel.WARN
default void
warn(Object o)
Logs the given object withLogLevel.WARN
default void
warn(String s)
Logs the given string withLogLevel.WARN
default void
warn(String s, Exception e)
Logs the given string with an exception withLogLevel.WARN
default void
warn(String s, Object... replacements)
Log the given string, and replaces every "{}" with the correct replacements withLogLevel.WARN
-
-
-
Method Detail
-
getInstance
static Logger getInstance()
Returns a Logger instance
Uses StalkWalker to get the caller class and calls
getInstance(Class)
- Returns:
- the logger instance
- See Also:
getInstance(Class)
-
getInstance
static Logger getInstance(Object objectForClazz)
Returns a logger instance- Parameters:
objectForClazz
- the object for which the class object is extracted- Returns:
- the logger instance
-
getInstance
static Logger getInstance(Class<?> clazz)
Returns a logger instance- Parameters:
clazz
- the class object that is used for logging- Returns:
- the logger instance
-
log
default void log(LogLevel level, Object object)
Logs the given object by using toString method- Parameters:
level
- of logobject
- object to be logged
-
log
void log(LogLevel level, String s)
Logs the given string- Parameters:
level
- of logs
- message to be logged
-
log
void log(LogLevel level, String s, Exception e)
Logs the given string with an exception- Parameters:
level
- of logs
- message to be loggede
- error to be logged
-
log
void log(LogLevel level, Exception e)
Logs the given exception- Parameters:
level
- of loge
- error to be logged
-
log
void log(LogLevel level, String s, Object... replacements)
Log the given string, and replaces every "{}" with the correct replacements- Parameters:
level
- of levels
- message to be loggedreplacements
- replacement values for {}
-
trace
default void trace(Object o)
Logs the given object withLogLevel.TRACE
- Parameters:
o
- object to be logged
-
trace
default void trace(String s)
Logs the given string withLogLevel.TRACE
- Parameters:
s
- message to be logged
-
trace
default void trace(Exception e)
Logs the given exception withLogLevel.TRACE
- Parameters:
e
- error to be logged
-
trace
default void trace(String s, Exception e)
Logs the given string with an exception withLogLevel.TRACE
- Parameters:
s
- message to be loggede
- error to be logged
-
trace
default void trace(String s, Object... replacements)
Log the given string, and replaces every "{}" with the correct replacements withLogLevel.TRACE
- Parameters:
s
- message to be loggedreplacements
- replacement values for {}
-
debug
default void debug(Object o)
Logs the given object withLogLevel.DEBUG
- Parameters:
o
- object to be logged
-
debug
default void debug(String s)
Logs the given string withLogLevel.DEBUG
- Parameters:
s
- message to be logged
-
debug
default void debug(Exception e)
Logs the given exception withLogLevel.DEBUG
- Parameters:
e
- error to be logged
-
debug
default void debug(String s, Exception e)
Logs the given string with an exception withLogLevel.DEBUG
- Parameters:
s
- message to be loggede
- error to be logged
-
debug
default void debug(String s, Object... replacements)
Log the given string, and replaces every "{}" with the correct replacements withLogLevel.DEBUG
- Parameters:
s
- message to be loggedreplacements
- replacement values for {}
-
info
default void info(Object o)
Logs the given object withLogLevel.INFO
- Parameters:
o
- object to be logged
-
info
default void info(String s)
Logs the given string withLogLevel.INFO
- Parameters:
s
- message to be logged
-
info
default void info(Exception e)
Logs the given exception withLogLevel.INFO
- Parameters:
e
- error to be logged
-
info
default void info(String s, Exception e)
Logs the given string with an exception withLogLevel.INFO
- Parameters:
s
- message to be loggede
- error to be logged
-
info
default void info(String s, Object... replacements)
Log the given string, and replaces every "{}" with the correct replacements withLogLevel.INFO
- Parameters:
s
- message to be loggedreplacements
- replacement values for {}
-
warn
default void warn(Object o)
Logs the given object withLogLevel.WARN
- Parameters:
o
- object to be logged
-
warn
default void warn(String s)
Logs the given string withLogLevel.WARN
- Parameters:
s
- message to be logged
-
warn
default void warn(Exception e)
Logs the given exception withLogLevel.WARN
- Parameters:
e
- error to be logged
-
warn
default void warn(String s, Exception e)
Logs the given string with an exception withLogLevel.WARN
- Parameters:
s
- message to be loggede
- error to be logged
-
warn
default void warn(String s, Object... replacements)
Log the given string, and replaces every "{}" with the correct replacements withLogLevel.WARN
- Parameters:
s
- message to be loggedreplacements
- replacement values for {}
-
error
default void error(Object o)
Logs the given object withLogLevel.ERROR
- Parameters:
o
- object to be logged
-
error
default void error(String s)
Logs the given string withLogLevel.ERROR
- Parameters:
s
- message to be logged
-
error
default void error(Exception e)
Logs the given exception withLogLevel.ERROR
- Parameters:
e
- error to be logged
-
error
default void error(String s, Exception e)
Logs the given string with an exception withLogLevel.ERROR
- Parameters:
s
- message to be loggede
- error to be logged
-
error
default void error(String s, Object... replacements)
Log the given string, and replaces every "{}" with the correct replacements withLogLevel.ERROR
- Parameters:
s
- message to be loggedreplacements
- replacement values for {}
-
-