Interface Logger
-
- All Known Implementing Classes:
ConsoleLogger,Slf4jLogger
public interface LoggerSimple logger interface.This is a private interface and should not be used outside this project.
- Since:
- 4.0.0
- Author:
- Dmytro Nosan
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description voiddebug(String message)Log the message from the provided message at debug level.voiddebug(String message, Object... args)Log the message from the provided message at debug level.voiddebug(Throwable throwable, String message)Log the providedThrowableand message at debug level.voiddebug(Throwable throwable, String message, Object... args)Log the providedThrowableand message at debug level.voiderror(String message)Log the message from the provided message at error level.voiderror(String message, Object... args)Log the message from the provided message at error level.voiderror(Throwable throwable, String message)Log the providedThrowableand message at error level.voiderror(Throwable throwable, String message, Object... args)Log the providedThrowableand message at error level.static Loggerget(Class<?> clazz)Gets aLoggerfor the specified class.static Loggerget(String name)Gets aLoggerfor the specified name.StringgetName()Gets the name of thisLoggerinstance.voidinfo(String message)Log the message from the provided at info level.voidinfo(String message, Object... args)Log the message from the provided at info level.voidinfo(Throwable throwable, String message)Log the providedThrowableand message at info level.voidinfo(Throwable throwable, String message, Object... args)Log the providedThrowableand message at 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 the message from the provided message at trace level.voidtrace(String message, Object... args)Log the message from the provided message at trace level.voidtrace(Throwable throwable, String message)Log the providedThrowableand message at trace level.voidtrace(Throwable throwable, String message, Object... args)Log the providedThrowableand message at trace level.voidwarn(String message)Log the message from the provided message at warn level.voidwarn(String message, Object... args)Log the message from the provided message at warn level.voidwarn(Throwable throwable, String message)Log the providedThrowableand message at warn level.voidwarn(Throwable throwable, String message, Object... args)Log the providedThrowableand message at warn level.
-
-
-
Field Detail
-
ROOT
static final String ROOT
The root logger name.- See Also:
- Constant Field Values
-
-
Method Detail
-
get
static Logger get(Class<?> clazz)
Gets aLoggerfor the specified class.- Parameters:
clazz- the class for which to get the logger- Returns:
- the logger
-
get
static Logger get(String name)
Gets aLoggerfor the specified name.- Parameters:
name- the name for which to get the logger- Returns:
- the logger
-
getName
String getName()
Gets the name of thisLoggerinstance.- Returns:
- name of this logger instance
-
isErrorEnabled
boolean isErrorEnabled()
Is the logger instance enabled for the ERROR level.- Returns:
trueif this Logger is enabled for the ERROR level
-
error
void error(String message)
Log the message from the provided message at error level.- Parameters:
message- the message string to be logged
-
error
void error(String message, Object... args)
Log the message from the provided message at error level.- Parameters:
message- the pattern stringargs- object(s) to format- See Also:
MessageFormat.format(String, Object...)
-
error
void error(Throwable throwable, String message)
Log the providedThrowableand message at error level.- Parameters:
message- the message string to be loggedthrowable- the exception (throwable) to be logged
-
error
void error(Throwable throwable, String message, Object... args)
Log the providedThrowableand message at error level.- Parameters:
throwable- the exception (throwable) to be loggedmessage- the pattern stringargs- object(s) to format- See Also:
MessageFormat.format(String, Object...)
-
isWarnEnabled
boolean isWarnEnabled()
Is the logger instance enabled for the WARN level.- Returns:
trueif this Logger is enabled for the WARN level
-
warn
void warn(String message)
Log the message from the provided message at warn level.- Parameters:
message- the message string to be logged
-
warn
void warn(String message, Object... args)
Log the message from the provided message at warn level.- Parameters:
message- the pattern stringargs- object(s) to format- See Also:
MessageFormat.format(String, Object...)
-
warn
void warn(Throwable throwable, String message)
Log the providedThrowableand message at warn level.- Parameters:
throwable- the exception (throwable) to be loggedmessage- the message string to be logged
-
warn
void warn(Throwable throwable, String message, Object... args)
Log the providedThrowableand message at warn level.- Parameters:
throwable- the exception (throwable) to be loggedmessage- the pattern stringargs- object(s) to format- See Also:
MessageFormat.format(String, Object...)
-
isInfoEnabled
boolean isInfoEnabled()
Is the logger instance enabled for the INFO level.- Returns:
trueif this Logger is enabled for the INFO level
-
info
void info(String message)
Log the message from the provided at info level.- Parameters:
message- the message string to be logged
-
info
void info(String message, Object... args)
Log the message from the provided at info level.- Parameters:
message- the pattern stringargs- object(s) to format- See Also:
MessageFormat.format(String, Object...)
-
info
void info(Throwable throwable, String message)
Log the providedThrowableand message at info level.- Parameters:
throwable- the exception (throwable) to be loggedmessage- the message string to be logged
-
info
void info(Throwable throwable, String message, Object... args)
Log the providedThrowableand message at info level.- Parameters:
throwable- the exception (throwable) to be loggedmessage- the pattern stringargs- object(s) to format- See Also:
MessageFormat.format(String, Object...)
-
isDebugEnabled
boolean isDebugEnabled()
Is the logger instance enabled for the DEBUG level.- Returns:
trueif this Logger is enabled for the DEBUG level
-
debug
void debug(String message)
Log the message from the provided message at debug level.- Parameters:
message- the message string to be logged
-
debug
void debug(String message, Object... args)
Log the message from the provided message at debug level.- Parameters:
message- the pattern stringargs- object(s) to format- See Also:
MessageFormat.format(String, Object...)
-
debug
void debug(Throwable throwable, String message)
Log the providedThrowableand message at debug level.- Parameters:
throwable- the exception (throwable) to be loggedmessage- the message string to be logged
-
debug
void debug(Throwable throwable, String message, Object... args)
Log the providedThrowableand message at debug level.- Parameters:
throwable- the exception (throwable) to be loggedmessage- the pattern stringargs- object(s) to format- See Also:
MessageFormat.format(String, Object...)
-
isTraceEnabled
boolean isTraceEnabled()
Is the logger instance enabled for the TRACE level.- Returns:
trueif this Logger is enabled for the TRACE level
-
trace
void trace(String message)
Log the message from the provided message at trace level.- Parameters:
message- the message string to be logged
-
trace
void trace(String message, Object... args)
Log the message from the provided message at trace level.- Parameters:
message- the pattern stringargs- object(s) to format- See Also:
MessageFormat.format(String, Object...)
-
trace
void trace(Throwable throwable, String message)
Log the providedThrowableand message at trace level.- Parameters:
throwable- the exception (throwable) to be loggedmessage- the message string to be logged
-
trace
void trace(Throwable throwable, String message, Object... args)
Log the providedThrowableand message at trace level.- Parameters:
throwable- the exception (throwable) to be loggedmessage- the pattern stringargs- object(s) to format- See Also:
MessageFormat.format(String, Object...)
-
-