public final class FixedLogger extends Object
FixedLogger is a wrapper for Logger that binds the
specified logger to the specific level.| Constructor and Description |
|---|
FixedLogger(org.slf4j.Logger log,
VTNLogLevel level)
Construct a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
org.slf4j.Logger |
getLogger()
Return the logger instance.
|
VTNLogLevel |
getLogLevel()
Return the logging level.
|
boolean |
isEnabled()
Determine whether the logging is enabled or not.
|
void |
log(String msg)
Log the specified message.
|
void |
log(String format,
Object... args)
Log a message according to the specified format string and arguments.
|
void |
log(String msg,
Throwable t)
Log the specified message and exception.
|
void |
log(Throwable t,
String format,
Object... args)
Log the specified throwable and a message according to the given
format string and arguments.
|
public FixedLogger(org.slf4j.Logger log,
VTNLogLevel level)
log - A Logger instance.level - A VTNLogLevel instance.public org.slf4j.Logger getLogger()
Logger instance.public VTNLogLevel getLogLevel()
VTNLogLevel instance.public boolean isEnabled()
true only if the logging is enabled.public void log(String msg)
msg - A message to be logged.public void log(String format, Object... args)
format - A format string used to construct log message.args - An object array used to construct log message.public void log(String msg, Throwable t)
msg - A message to be logged.t - A Throwable to be logged.public void log(Throwable t, String format, Object... args)
Note that this method constructs a log message using
String.format(String, Object[]).
t - A Throwable to be logged.format - A format string used to construct log message.args - An object array used to construct log message.Copyright © 2018 OpenDaylight. All rights reserved.