Interface FixedLevelLogger
-
public interface FixedLevelLoggerA logger that logs at a fixedLogLevel.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanisEnabled()Determine if the level is enabled.voidlog(java.lang.String msg)Log aStringcorresponding level.voidlog(java.lang.String format, java.lang.Object arg)Log a message at the corresponding level according to the specified format and argument.voidlog(java.lang.String format, java.lang.Object... args)Log a message at the corresponding level according to the specified format and arguments.voidlog(java.lang.String format, java.lang.Object arg1, java.lang.Object arg2)Log a message at the corresponding level according to the specified format and arguments.voidlog(java.lang.String msg, java.lang.Throwable cause)Log anExceptionat the corresponding level with an accompanying message.java.lang.StringloggerName()Get the logger name.LogLevellogLevel()Get the level of this logger.
-
-
-
Method Detail
-
loggerName
java.lang.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
void log(java.lang.String msg)
Log aStringcorresponding level.- Parameters:
msg- the message to log.
-
log
void log(java.lang.String msg, java.lang.Throwable cause)Log anExceptionat the corresponding level with an accompanying message.- Parameters:
msg- the message accompanying the exception.cause- the exception (throwable) to log.
-
log
void log(java.lang.String format, java.lang.Object arg)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
void log(java.lang.String format, java.lang.Object arg1, java.lang.Object arg2)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
void log(java.lang.String format, java.lang.Object... args)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.
-
-