Interface Logger
- All Known Implementing Classes:
FallbackLogger
public interface Logger
A logger. Basic interface taken over from SLF4j except for markers. The format for parameterized log messages
is that of SLF4J, i.e., {} in the message are substituted in the order of given arguments.
- Author:
- Holger Eichelberger, SSE, SLF4J
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceFinally emits the log message. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringCase insensitive String constant used to retrieve the name of the root logger. -
Method Summary
Modifier and TypeMethodDescriptionvoidLog a message at the DEBUG level.voidLog a message at the DEBUG level according to the specified format and argument.voidLog a message at the DEBUG level according to the specified format and arguments.voidLog a message at the DEBUG level according to the specified format and arguments.voidLog an exception (throwable) at the DEBUG level with an accompanying message.voidLog a message at the ERROR level.voidLog a message at the ERROR level according to the specified format and argument.voidLog a message at the ERROR level according to the specified format and arguments.voidLog a message at the ERROR level according to the specified format and arguments.voidLog an exception (throwable) at the ERROR level with an accompanying message.getLevel()Returns the log level.getName()Returns the name of the logger.voidLog a message at the INFO level.voidLog a message at the INFO level according to the specified format and argument.voidLog a message at the INFO level according to the specified format and arguments.voidLog a message at the INFO level according to the specified format and arguments.voidLog an exception (throwable) at the INFO level with an accompanying message.default voidLog a message at the given level.default voidLog a message at the given level.default voidLog a message at the given level.default voidLog a message at the given level.default voidLog a message at the given level.default booleansetEmitter(Logger.Emitter emitter) Sets the emitter so that the output format can be changed programmatically.booleanSets the log level.voidLog a message at the TRACE level.voidLog a message at the TRACE level according to the specified format and argument.voidLog a message at the TRACE level according to the specified format and arguments.voidLog a message at the TRACE level according to the specified format and arguments.voidLog an exception (throwable) at the TRACE level with an accompanying message.voidLog a message at the WARN level.voidLog a message at the WARN level according to the specified format and argument.voidLog a message at the WARN level according to the specified format and arguments.voidLog a message at the WARN level according to the specified format and arguments.voidLog an exception (throwable) at the WARN level with an accompanying message.
-
Field Details
-
ROOT_LOGGER_NAME
Case insensitive String constant used to retrieve the name of the root logger.- See Also:
-
-
Method Details
-
setEmitter
Sets the emitter so that the output format can be changed programmatically. May not be supported by all loggers.- Parameters:
emitter- the emitter, shall be ignored if null- Returns:
trueif accepted,falseif ignored
-
setLevel
Sets the log level.- Parameters:
level- the new log level- Returns:
trueif successful and changed,falseif not changed or ignored
-
getLevel
LogLevel getLevel()Returns the log level.- Returns:
- the log level, may be null if not accessible/unknown
-
getName
String getName()Returns the name of the logger.- Returns:
- the name of the logger
-
trace
Log a message at the TRACE level.- Parameters:
msg- the message string to be logged
-
trace
Log a message at the TRACE level according to the specified format and argument.- Parameters:
format- the format stringarg- the argument
-
trace
Log a message at the TRACE level according to the specified format and arguments.- Parameters:
format- the format stringarg1- the first argumentarg2- the second argument
-
trace
Log a message at the TRACE level according to the specified format and arguments.- Parameters:
format- the format stringarguments- a list of 3 or more arguments
-
trace
Log an exception (throwable) at the TRACE level with an accompanying message.- Parameters:
msg- the message accompanying the exceptionth- the exception (throwable) to log
-
debug
Log a message at the DEBUG level.- Parameters:
msg- the message string to be logged
-
debug
Log a message at the DEBUG level according to the specified format and argument.- Parameters:
format- the format stringarg- the argument
-
debug
Log a message at the DEBUG level according to the specified format and arguments.- Parameters:
format- the format stringarg1- the first argumentarg2- the second argument
-
debug
Log a message at the DEBUG level according to the specified format and arguments.- Parameters:
format- the format stringarguments- a list of 3 or more arguments
-
debug
Log an exception (throwable) at the DEBUG level with an accompanying message.- Parameters:
msg- the message accompanying the exceptionth- the exception (throwable) to log
-
info
Log a message at the INFO level.- Parameters:
msg- the message string to be logged
-
info
Log a message at the INFO level according to the specified format and argument.- Parameters:
format- the format stringarg- the argument
-
info
Log a message at the INFO level according to the specified format and arguments.- Parameters:
format- the format stringarg1- the first argumentarg2- the second argument
-
info
Log a message at the INFO level according to the specified format and arguments.- Parameters:
format- the format stringarguments- a list of 3 or more arguments
-
info
Log an exception (throwable) at the INFO level with an accompanying message.- Parameters:
msg- the message accompanying the exceptionth- the exception (throwable) to log
-
warn
Log a message at the WARN level.- Parameters:
msg- the message string to be logged
-
warn
Log a message at the WARN level according to the specified format and argument.- Parameters:
format- the format stringarg- the argument
-
warn
Log a message at the WARN level according to the specified format and arguments.- Parameters:
format- the format stringarg1- the first argumentarg2- the second argument
-
warn
Log a message at the WARN level according to the specified format and arguments.- Parameters:
format- the format stringarguments- a list of 3 or more arguments
-
warn
Log an exception (throwable) at the WARN level with an accompanying message.- Parameters:
msg- the message accompanying the exceptionth- the exception (throwable) to log
-
error
Log a message at the ERROR level.- Parameters:
msg- the message string to be logged
-
error
Log a message at the ERROR level according to the specified format and argument.- Parameters:
format- the format stringarg- the argument
-
error
Log a message at the ERROR level according to the specified format and arguments.- Parameters:
format- the format stringarg1- the first argumentarg2- the second argument
-
error
Log a message at the ERROR level according to the specified format and arguments.- Parameters:
format- the format stringarguments- a list of 3 or more arguments
-
error
Log an exception (throwable) at the ERROR level with an accompanying message.- Parameters:
msg- the message accompanying the exceptionth- the exception (throwable) to log
-
log
Log a message at the given level.- Parameters:
level- the logging level to use (LogLevel.ALLandLogLevel.OFFare ignored)msg- the message string to be logged
-
log
Log a message at the given level.- Parameters:
level- the logging level to use (LogLevel.ALLandLogLevel.OFFare ignored)format- the format stringarg- the argument
-
log
Log a message at the given level.- Parameters:
level- the logging level to use (LogLevel.ALLandLogLevel.OFFare ignored)format- the format stringarg1- the first argumentarg2- the second argument
-
log
Log a message at the given level.- Parameters:
level- the logging level to use (LogLevel.ALLandLogLevel.OFFare ignored)format- the format stringarguments- a list of 3 or more arguments
-
log
Log a message at the given level.- Parameters:
level- the logging level to use (LogLevel.ALLandLogLevel.OFFare ignored)msg- the message accompanying the exceptionth- the exception (throwable) to log
-