public interface Logger
Modifier and Type | Method and Description |
---|---|
boolean |
isLoggable(java.util.logging.Level level)
Returns true if the given log level will be logged.
|
void |
log(java.util.logging.Level level,
java.lang.String pattern,
java.lang.Object... parts)
Concatenate the given parts and log them at the given level.
|
void |
log(java.util.logging.Level level,
java.lang.Throwable t,
java.lang.String pattern,
java.lang.Object... msg)
Log a message with given Throwable information.
|
void |
logToChild(java.lang.String childName,
java.util.logging.Level level,
java.lang.String pattern,
java.lang.Object... parts)
Concatenate the given parts and log them at the given level.
|
boolean isLoggable(java.util.logging.Level level)
log(Level, String, Object...)
methods with the message broken into parts. The overhead of the
concatenation will not be incurred if the log level isn't met.level
- The level to be verified.void log(java.util.logging.Level level, java.lang.String pattern, java.lang.Object... parts)
null
, its value will be
represented as "null". If a part is a Class
, the value of Class.getName()
will be used.level
- The level at which the message should be logged.pattern
- A message format pattern in the MessageFormat
style.parts
- The parts to be placed in the log message using the MessageFormat
stylevoid log(java.util.logging.Level level, java.lang.Throwable t, java.lang.String pattern, java.lang.Object... msg)
null
, its value will be represented as "null". If a part is a
Class
, the value of Class.getName()
will be used.level
- The level at which the message should be logged.t
- The exception to be logged.pattern
- A message format pattern in the MessageFormat
style.msg
- The parts to be placed in the log message using the MessageFormat
style.void logToChild(java.lang.String childName, java.util.logging.Level level, java.lang.String pattern, java.lang.Object... parts)
null
, its value will be
represented as "null". If a part is a Class
, the value of Class.getName()
will be used.childName
- The name of the child logger.level
- The level at which the message should be logged.pattern
- A message format pattern in the MessageFormat
style.parts
- The parts to be placed in the log message using the MessageFormat
style.