Package alpine.logging
Class Logger
- java.lang.Object
-
- alpine.logging.Logger
-
public final class Logger extends Object
All logging is handled through this class. This class wraps an actual logging implementation or logging framework so that implementations can be swapped out without having to modify classes that use this logging mechanism. Note, if Markers are used, the logging implementation will be tied to SLF4j.- Since:
- 1.0.0
- Author:
- Steve Springett
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddebug(String message)Log a message at the DEBUG level.voiddebug(String message, Throwable throwable)Log a message at the DEBUG level.voiddebug(org.slf4j.Marker marker, String message)Log a message at the DEBUG level.voiddebug(org.slf4j.Marker marker, String message, Object object)Log a message at the DEBUG level.voiddebug(org.slf4j.Marker marker, String message, Object... objects)Log a message at the DEBUG level.voiddebug(org.slf4j.Marker marker, String message, Object o1, Object o2)Log a message at the DEBUG level.voiddebug(org.slf4j.Marker marker, String message, Throwable throwable)Log a message at the DEBUG level.voiderror(String message)Log a message at the ERROR level.voiderror(String message, Throwable throwable)Log a message at the ERROR level.voiderror(org.slf4j.Marker marker, String message)Log a message at the ERROR level.voiderror(org.slf4j.Marker marker, String message, Object object)Log a message at the ERROR level.voiderror(org.slf4j.Marker marker, String message, Object... objects)Log a message at the ERROR level.voiderror(org.slf4j.Marker marker, String message, Object o1, Object o2)Log a message at the ERROR level.voiderror(org.slf4j.Marker marker, String message, Throwable throwable)Log a message at the ERROR level.static LoggergetLogger(Class<?> clazz)Create an instance of this class and initialize the underlying logging framework.voidinfo(String message)Log a message at the INFO level.voidinfo(String message, Throwable throwable)Log a message at the INFO level.voidinfo(org.slf4j.Marker marker, String message)Log a message at the INFO level.voidinfo(org.slf4j.Marker marker, String message, Object object)Log a message at the INFO level.voidinfo(org.slf4j.Marker marker, String message, Object... objects)Log a message at the INFO level.voidinfo(org.slf4j.Marker marker, String message, Object o1, Object o2)Log a message at the INFO level.voidinfo(org.slf4j.Marker marker, String message, Throwable throwable)Log a message at the INFO level.booleanisDebugEnabled()Is the logger instance enabled for the DEBUG level?booleanisErrorEnabled()Is the logger instance enabled for the ERROR level?booleanisInfoEnabled()Is the logger instance enabled for the INFO level?booleanisTraceEnabled()Is the logger instance enabled for the TRACE level?booleanisWarnEnabled()Is the logger instance enabled for the WARN level?voidtrace(String message)Log a message at the TRACE level.voidtrace(String message, Throwable throwable)Log a message at the TRACE level.voidtrace(org.slf4j.Marker marker, String message)Log a message at the TRACE level.voidtrace(org.slf4j.Marker marker, String message, Object object)Log a message at the TRACE level.voidtrace(org.slf4j.Marker marker, String message, Object... objects)Log a message at the TRACE level.voidtrace(org.slf4j.Marker marker, String message, Object o1, Object o2)Log a message at the TRACE level.voidtrace(org.slf4j.Marker marker, String message, Throwable throwable)Log a message at the TRACE level.voidwarn(String message)Log a message at the WARN level.voidwarn(String message, Throwable throwable)Log a message at the WARN level.voidwarn(org.slf4j.Marker marker, String message)Log a message at the WARN level.voidwarn(org.slf4j.Marker marker, String message, Object object)Log a message at the WARN level.voidwarn(org.slf4j.Marker marker, String message, Object... objects)Log a message at the WARN level.voidwarn(org.slf4j.Marker marker, String message, Object o1, Object o2)Log a message at the WARN level.voidwarn(org.slf4j.Marker marker, String message, Throwable throwable)Log a message at the WARN level.
-
-
-
Method Detail
-
getLogger
public static Logger getLogger(Class<?> clazz)
Create an instance of this class and initialize the underlying logging framework.- Parameters:
clazz- The class to use when writing log information- Returns:
- An instance of the Logger class
- Since:
- 1.0.0
-
isInfoEnabled
public boolean isInfoEnabled()
Is the logger instance enabled for the INFO level?- Returns:
- True if this Logger is enabled for the INFO level, false otherwise.
- Since:
- 1.0.0
-
isDebugEnabled
public boolean isDebugEnabled()
Is the logger instance enabled for the DEBUG level?- Returns:
- True if this Logger is enabled for the DEBUG level, false otherwise.
- Since:
- 1.0.0
-
isErrorEnabled
public boolean isErrorEnabled()
Is the logger instance enabled for the ERROR level?- Returns:
- True if this Logger is enabled for the ERROR level, false otherwise.
- Since:
- 1.0.0
-
isTraceEnabled
public boolean isTraceEnabled()
Is the logger instance enabled for the TRACE level?- Returns:
- True if this Logger is enabled for the TRACE level, false otherwise.
- Since:
- 1.0.0
-
isWarnEnabled
public boolean isWarnEnabled()
Is the logger instance enabled for the WARN level?- Returns:
- True if this Logger is enabled for the WARN level, false otherwise.
- Since:
- 1.0.0
-
info
public void info(String message)
Log a message at the INFO level.- Parameters:
message- the message string to be logged- Since:
- 1.0.0
-
info
public void info(String message, Throwable throwable)
Log a message at the INFO level.- Parameters:
message- the message string to be loggedthrowable- the exception (throwable) to log- Since:
- 1.0.0
-
info
public void info(org.slf4j.Marker marker, String message)Log a message at the INFO level.- Parameters:
marker- The marker specific to this log statementmessage- the message string to be logged- Since:
- 1.0.0
-
info
public void info(org.slf4j.Marker marker, String message, Object object)Log a message at the INFO level.- Parameters:
marker- The marker specific to this log statementmessage- the message string to be loggedobject- the argument- Since:
- 1.0.0
-
info
public void info(org.slf4j.Marker marker, String message, Object o1, Object o2)Log a message at the INFO level.- Parameters:
marker- The marker specific to this log statementmessage- the message string to be loggedo1- the first argumento2- the second argument- Since:
- 1.0.0
-
info
public void info(org.slf4j.Marker marker, String message, Object... objects)Log a message at the INFO level.- Parameters:
marker- The marker specific to this log statementmessage- the message string to be loggedobjects- a list of 3 or more arguments- Since:
- 1.0.0
-
info
public void info(org.slf4j.Marker marker, String message, Throwable throwable)Log a message at the INFO level.- Parameters:
marker- The marker specific to this log statementmessage- the message string to be loggedthrowable- the exception (throwable) to log- Since:
- 1.0.0
-
debug
public void debug(String message)
Log a message at the DEBUG level.- Parameters:
message- the message string to be logged- Since:
- 1.0.0
-
debug
public void debug(String message, Throwable throwable)
Log a message at the DEBUG level.- Parameters:
message- the message string to be loggedthrowable- the exception (throwable) to log- Since:
- 1.0.0
-
debug
public void debug(org.slf4j.Marker marker, String message)Log a message at the DEBUG level.- Parameters:
marker- The marker specific to this log statementmessage- the message string to be logged- Since:
- 1.0.0
-
debug
public void debug(org.slf4j.Marker marker, String message, Object object)Log a message at the DEBUG level.- Parameters:
marker- The marker specific to this log statementmessage- the message string to be loggedobject- the argument- Since:
- 1.0.0
-
debug
public void debug(org.slf4j.Marker marker, String message, Object o1, Object o2)Log a message at the DEBUG level.- Parameters:
marker- The marker specific to this log statementmessage- the message string to be loggedo1- the first argumento2- the second argument- Since:
- 1.0.0
-
debug
public void debug(org.slf4j.Marker marker, String message, Object... objects)Log a message at the DEBUG level.- Parameters:
marker- The marker specific to this log statementmessage- the message string to be loggedobjects- a list of 3 or more arguments- Since:
- 1.0.0
-
debug
public void debug(org.slf4j.Marker marker, String message, Throwable throwable)Log a message at the DEBUG level.- Parameters:
marker- The marker specific to this log statementmessage- the message string to be loggedthrowable- the exception (throwable) to log- Since:
- 1.0.0
-
error
public void error(String message)
Log a message at the ERROR level.- Parameters:
message- the message string to be logged- Since:
- 1.0.0
-
error
public void error(String message, Throwable throwable)
Log a message at the ERROR level.- Parameters:
message- the message string to be loggedthrowable- the exception (throwable) to log- Since:
- 1.0.0
-
error
public void error(org.slf4j.Marker marker, String message)Log a message at the ERROR level.- Parameters:
marker- The marker specific to this log statementmessage- the message string to be logged- Since:
- 1.0.0
-
error
public void error(org.slf4j.Marker marker, String message, Object object)Log a message at the ERROR level.- Parameters:
marker- The marker specific to this log statementmessage- the message string to be loggedobject- the argument- Since:
- 1.0.0
-
error
public void error(org.slf4j.Marker marker, String message, Object o1, Object o2)Log a message at the ERROR level.- Parameters:
marker- The marker specific to this log statementmessage- the message string to be loggedo1- the first argumento2- the second argument- Since:
- 1.0.0
-
error
public void error(org.slf4j.Marker marker, String message, Object... objects)Log a message at the ERROR level.- Parameters:
marker- The marker specific to this log statementmessage- the message string to be loggedobjects- a list of 3 or more arguments- Since:
- 1.0.0
-
error
public void error(org.slf4j.Marker marker, String message, Throwable throwable)Log a message at the ERROR level.- Parameters:
marker- The marker specific to this log statementmessage- the message string to be loggedthrowable- the exception (throwable) to log- Since:
- 1.0.0
-
trace
public void trace(String message)
Log a message at the TRACE level.- Parameters:
message- the message string to be logged- Since:
- 1.0.0
-
trace
public void trace(String message, Throwable throwable)
Log a message at the TRACE level.- Parameters:
message- the message string to be loggedthrowable- the exception (throwable) to log- Since:
- 1.0.0
-
trace
public void trace(org.slf4j.Marker marker, String message)Log a message at the TRACE level.- Parameters:
marker- The marker specific to this log statementmessage- the message string to be logged- Since:
- 1.0.0
-
trace
public void trace(org.slf4j.Marker marker, String message, Object object)Log a message at the TRACE level.- Parameters:
marker- The marker specific to this log statementmessage- the message string to be loggedobject- the argument- Since:
- 1.0.0
-
trace
public void trace(org.slf4j.Marker marker, String message, Object o1, Object o2)Log a message at the TRACE level.- Parameters:
marker- The marker specific to this log statementmessage- the message string to be loggedo1- the first argumento2- the second argument- Since:
- 1.0.0
-
trace
public void trace(org.slf4j.Marker marker, String message, Object... objects)Log a message at the TRACE level.- Parameters:
marker- The marker specific to this log statementmessage- the message string to be loggedobjects- a list of 3 or more arguments- Since:
- 1.0.0
-
trace
public void trace(org.slf4j.Marker marker, String message, Throwable throwable)Log a message at the TRACE level.- Parameters:
marker- The marker specific to this log statementmessage- the message string to be loggedthrowable- the exception (throwable) to log- Since:
- 1.0.0
-
warn
public void warn(String message)
Log a message at the WARN level.- Parameters:
message- the message string to be logged- Since:
- 1.0.0
-
warn
public void warn(String message, Throwable throwable)
Log a message at the WARN level.- Parameters:
message- the message string to be loggedthrowable- the exception (throwable) to log- Since:
- 1.0.0
-
warn
public void warn(org.slf4j.Marker marker, String message)Log a message at the WARN level.- Parameters:
marker- The marker specific to this log statementmessage- the message string to be logged- Since:
- 1.0.0
-
warn
public void warn(org.slf4j.Marker marker, String message, Object object)Log a message at the WARN level.- Parameters:
marker- The marker specific to this log statementmessage- the message string to be loggedobject- the argument- Since:
- 1.0.0
-
warn
public void warn(org.slf4j.Marker marker, String message, Object o1, Object o2)Log a message at the WARN level.- Parameters:
marker- The marker specific to this log statementmessage- the message string to be loggedo1- the first argumento2- the second argument- Since:
- 1.0.0
-
warn
public void warn(org.slf4j.Marker marker, String message, Object... objects)Log a message at the WARN level.- Parameters:
marker- The marker specific to this log statementmessage- the message string to be loggedobjects- a list of 3 or more arguments- Since:
- 1.0.0
-
-