public enum Level extends Enum<Level>
Level inverts calls to SLF4J providing an object for methods corresponding to each
logging level.| Enum Constant and Description |
|---|
DEBUG
All log calls are at the DEBUG level.
|
ERROR
All log calls are at the ERROR level.
|
INFO
All log calls are at the INFO level.
|
NONE
All log calls are ignored.
|
TRACE
All log calls are at the TRACE level.
|
WARN
All log calls are at the WARN level.
|
| Modifier and Type | Method and Description |
|---|---|
abstract boolean |
isEnabled(org.slf4j.Logger logger)
Is the logger instance enabled for this level?
|
abstract boolean |
isEnabled(org.slf4j.Logger logger,
org.slf4j.Marker marker)
Similar to
isEnabled(Logger) method except that the marker data is also taken into
account. |
abstract void |
log(org.slf4j.Logger logger,
org.slf4j.Marker marker,
String msg)
Log a message with the specific Marker at this level.
|
abstract void |
log(org.slf4j.Logger logger,
org.slf4j.Marker marker,
String format,
Object... argArray)
This method is similar to
log(Logger, String, Object...) method except that the
marker data is also taken into consideration. |
abstract void |
log(org.slf4j.Logger logger,
org.slf4j.Marker marker,
String format,
Object arg)
This method is similar to
log(Logger, String, Object) method except that the marker
data is also taken into consideration. |
abstract void |
log(org.slf4j.Logger logger,
org.slf4j.Marker marker,
String format,
Object arg1,
Object arg2)
This method is similar to
log(Logger, String, Object, Object) method except that the
marker data is also taken into consideration. |
abstract void |
log(org.slf4j.Logger logger,
org.slf4j.Marker marker,
String msg,
Throwable t)
This method is similar to
log(Logger, String, Throwable) method except that the
marker data is also taken into consideration. |
abstract void |
log(org.slf4j.Logger logger,
String msg)
Log a message at this level.
|
abstract void |
log(org.slf4j.Logger logger,
String format,
Object... arguments)
Log a message at this level according to the specified format and arguments.
|
abstract void |
log(org.slf4j.Logger logger,
String format,
Object arg)
Log a message at this level according to the specified format and argument.
|
abstract void |
log(org.slf4j.Logger logger,
String format,
Object arg1,
Object arg2)
Log a message at this level according to the specified format and arguments.
|
abstract void |
log(org.slf4j.Logger logger,
String msg,
Throwable t)
Log an exception (throwable) at this level with an accompanying message.
|
static Level |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Level[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static Level[] values()
for (Level c : Level.values()) System.out.println(c);
public static Level valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic abstract boolean isEnabled(org.slf4j.Logger logger)
public abstract void log(org.slf4j.Logger logger, String msg)
msg - the message string to be loggedpublic abstract void log(org.slf4j.Logger logger, String format, Object arg)
This form avoids superfluous object creation when the logger is disabled for this level.
format - the format stringarg - the argumentpublic abstract void log(org.slf4j.Logger logger, String format, Object arg1, Object arg2)
This form avoids superfluous object creation when the logger is disabled for this level.
format - the format stringarg1 - the first argumentarg2 - the second argumentpublic abstract void log(org.slf4j.Logger logger, String format, Object... arguments)
This
form avoids superfluous string concatenation when the logger is disabled for this 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 this level. The
variants taking one and two arguments exist solely in order to avoid this hidden cost.
format - the format stringarguments - a list of 3 or more argumentspublic abstract void log(org.slf4j.Logger logger, String msg, Throwable t)
msg - the message accompanying the exceptiont - the exception (throwable) to logpublic abstract boolean isEnabled(org.slf4j.Logger logger, org.slf4j.Marker marker)
isEnabled(Logger) method except that the marker data is also taken into
account.marker - The marker data to take into considerationpublic abstract void log(org.slf4j.Logger logger, org.slf4j.Marker marker, String msg)
marker - the marker data specific to this log statementmsg - the message string to be loggedpublic abstract void log(org.slf4j.Logger logger, org.slf4j.Marker marker, String format, Object arg)
log(Logger, String, Object) method except that the marker
data is also taken into consideration.marker - the marker data specific to this log statementformat - the format stringarg - the argumentpublic abstract void log(org.slf4j.Logger logger, org.slf4j.Marker marker, String format, Object arg1, Object arg2)
log(Logger, String, Object, Object) method except that the
marker data is also taken into consideration.marker - the marker data specific to this log statementformat - the format stringarg1 - the first argumentarg2 - the second argumentpublic abstract void log(org.slf4j.Logger logger, org.slf4j.Marker marker, String format, Object... argArray)
log(Logger, String, Object...) method except that the
marker data is also taken into consideration.marker - the marker data specific to this log statementformat - the format stringargArray - an array of argumentspublic abstract void log(org.slf4j.Logger logger, org.slf4j.Marker marker, String msg, Throwable t)
log(Logger, String, Throwable) method except that the
marker data is also taken into consideration.marker - the marker data specific to this log statementmsg - the message accompanying the exceptiont - the exception (throwable) to logCopyright © 2013–2015 binkley's BLOG. All rights reserved.