Interface FixedLevelLogger
public interface FixedLevelLogger
A logger that logs at a fixed
LogLevel.-
Method Summary
Modifier and TypeMethodDescriptionbooleanDetermine if the level is enabled.voidLog aStringcorresponding level.voidLog a message at the corresponding level according to the specified format and argument.voidLog a message at the corresponding level according to the specified format and arguments.voidLog a message at the corresponding level according to the specified format and arguments.voidLog anExceptionat the corresponding level with an accompanying message.Get the logger name.logLevel()Get the level of this logger.
-
Method Details
-
loggerName
String loggerName()Get the logger name.- Returns:
- the logger name.
-
logLevel
LogLevel logLevel()Get the level of this logger.- Returns:
- the level of this logger.
-
isEnabled
boolean isEnabled()Determine if the level is enabled.- Returns:
trueif the level is enabled.
-
log
Log aStringcorresponding level.- Parameters:
msg- the message to log.
-
log
Log anExceptionat the corresponding level with an accompanying message.- Parameters:
msg- the message accompanying the exception.cause- the exception (throwable) to log.
-
log
Log a message at the corresponding level according to the specified format and argument.This form avoids superfluous object creation when the logger is disabled for the corresponding level
- Parameters:
format- the format string.arg- the argument.
-
log
Log a message at the corresponding level according to the specified format and arguments.This form avoids superfluous object creation when the logger is disabled for the corresponding level.
- Parameters:
format- the format string.arg1- the first argument.arg2- the second argument.
-
log
Log a message at the corresponding level according to the specified format and arguments.This form avoids superfluous string concatenation when the logger is disabled for the corresponding level. However, this variant incurs the hidden (and relatively small) cost of creating an
Object[]before invoking the method, even if this logger is disabled for the corresponding level. The variants takingoneandtwoarguments exist solely in order to avoid this hidden cost.- Parameters:
format- the format string.args- a list of 3 or more arguments.
-