public interface FixedLevelLogger
LogLevel
.Modifier and Type | Method and Description |
---|---|
boolean |
isEnabled()
Determine if the level is enabled.
|
void |
log(java.lang.String msg)
Log a
String corresponding level. |
void |
log(java.lang.String format,
java.lang.Object... args)
Log a message at the corresponding level according to the specified format
and arguments.
|
void |
log(java.lang.String format,
java.lang.Object arg)
Log a message at the corresponding level according to the specified format
and argument.
|
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.
|
void |
log(java.lang.String msg,
java.lang.Throwable cause)
Log an
Exception at the corresponding level with an
accompanying message. |
java.lang.String |
loggerName()
Get the logger name.
|
LogLevel |
logLevel()
Get the level of this logger.
|
java.lang.String loggerName()
LogLevel logLevel()
boolean isEnabled()
true
if the level is enabled.void log(java.lang.String msg)
String
corresponding level.msg
- the message to log.void log(java.lang.String msg, java.lang.Throwable cause)
Exception
at the corresponding level with an
accompanying message.msg
- the message accompanying the exception.cause
- the exception (throwable) to log.void log(java.lang.String format, java.lang.Object arg)
This form avoids superfluous object creation when the logger is disabled for the corresponding level
format
- the format string.arg
- the argument.void log(java.lang.String format, java.lang.Object arg1, java.lang.Object arg2)
This form avoids superfluous object creation when the logger is disabled for the corresponding level.
format
- the format string.arg1
- the first argument.arg2
- the second argument.void log(java.lang.String format, java.lang.Object... args)
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 taking
one
and two
arguments exist solely in order to avoid this hidden cost.
format
- the format string.args
- a list of 3 or more arguments.