public class Slf4jUtils
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
protected static int |
differenceOf(LogLevel a,
LogLevel b) |
static boolean |
isEnabled(org.slf4j.Logger logger,
LogLevel level)
Is the logger instance enabled for the given
level? |
static boolean |
isEnabled(org.slf4j.Logger logger,
LogLevel level,
org.slf4j.Marker marker)
Similar to
isEnabled(org.slf4j.Logger, org.echocat.jomon.runtime.logging.LogLevel) method except that the marker data is also taken into account. |
static void |
log(org.slf4j.spi.LocationAwareLogger logger,
LogLevel level,
java.lang.String fqcn,
org.slf4j.Marker marker,
java.lang.String message,
java.lang.Object[] argArray,
java.lang.Throwable t) |
static void |
log(org.slf4j.Logger logger,
LogLevel level,
org.slf4j.Marker marker,
java.lang.String msg)
Log a message with the specific Marker at the given
level. |
static void |
log(org.slf4j.Logger logger,
LogLevel level,
org.slf4j.Marker marker,
java.lang.String format,
java.lang.Object... arguments)
This method is similar to
log(Logger, LogLevel, String, Object...) method except that the marker data is also taken into consideration. |
static void |
log(org.slf4j.Logger logger,
LogLevel level,
org.slf4j.Marker marker,
java.lang.String format,
java.lang.Object arg)
This method is similar to
log(Logger, LogLevel, String, Object) method except that the marker data is also taken into consideration. |
static void |
log(org.slf4j.Logger logger,
LogLevel level,
org.slf4j.Marker marker,
java.lang.String format,
java.lang.Object arg1,
java.lang.Object arg2)
This method is similar to
log(Logger, LogLevel, String, Object, Object) method except that the marker data is also taken into consideration. |
static void |
log(org.slf4j.Logger logger,
LogLevel level,
org.slf4j.Marker marker,
java.lang.String msg,
java.lang.Throwable t)
This method is similar to
log(Logger, LogLevel, String, Throwable) method except that the marker data is also taken into consideration. |
static void |
log(org.slf4j.Logger logger,
LogLevel level,
java.lang.String msg)
Log a message at the given
level. |
static void |
log(org.slf4j.Logger logger,
LogLevel level,
java.lang.String format,
java.lang.Object... arguments)
Log a message at the given
level according to the specified format and arguments. |
static void |
log(org.slf4j.Logger logger,
LogLevel level,
java.lang.String format,
java.lang.Object arg)
Log a message at the given
level according to the specified format and argument. |
static void |
log(org.slf4j.Logger logger,
LogLevel level,
java.lang.String format,
java.lang.Object arg1,
java.lang.Object arg2)
Log a message at the given
level according to the specified format and arguments. |
static void |
log(org.slf4j.Logger logger,
LogLevel level,
java.lang.String msg,
java.lang.Throwable t)
Log an exception (throwable) at the given
level with an accompanying message. |
protected static LogLevel |
normalize(LogLevel level) |
public static void log(@Nonnull
org.slf4j.spi.LocationAwareLogger logger,
@Nonnull
LogLevel level,
@Nullable
java.lang.String fqcn,
@Nullable
org.slf4j.Marker marker,
@Nullable
java.lang.String message,
@Nullable
java.lang.Object[] argArray,
@Nullable
java.lang.Throwable t)
public static boolean isEnabled(@Nonnull
org.slf4j.Logger logger,
@Nonnull
LogLevel level)
level?true if this Logger is enabled for the given level, false otherwise.public static void log(@Nonnull
org.slf4j.Logger logger,
@Nonnull
LogLevel level,
@Nullable
java.lang.String msg)
level.msg - the message string to be loggedpublic static void log(@Nonnull
org.slf4j.Logger logger,
@Nonnull
LogLevel level,
@Nonnull
java.lang.String format,
@Nullable
java.lang.Object arg)
Log a message at the given level according to the specified format and argument.
This form avoids superfluous object creation when the logger is disabled for the given level.
format - the format stringarg - the argumentpublic static void log(@Nonnull
org.slf4j.Logger logger,
@Nonnull
LogLevel level,
@Nonnull
java.lang.String format,
@Nullable
java.lang.Object arg1,
@Nullable
java.lang.Object arg2)
Log a message at the given level according to the specified format and arguments.
This form avoids superfluous object creation when the logger is disabled for the given level.
format - the format stringarg1 - the first argumentarg2 - the second argumentpublic static void log(@Nonnull
org.slf4j.Logger logger,
@Nonnull
LogLevel level,
@Nonnull
java.lang.String format,
@Nullable
java.lang.Object... arguments)
Log a message at the given level according to the specified format and arguments.
This form avoids superfluous object creation when the logger is disabled for the given level.
format - the format stringarguments - a list of 3 or more argumentspublic static void log(@Nonnull
org.slf4j.Logger logger,
@Nonnull
LogLevel level,
@Nullable
java.lang.String msg,
@Nullable
java.lang.Throwable t)
level with an accompanying message.msg - the message accompanying the exceptiont - the exception (throwable) to logpublic static boolean isEnabled(@Nonnull
org.slf4j.Logger logger,
@Nonnull
LogLevel level,
@Nonnull
org.slf4j.Marker marker)
isEnabled(org.slf4j.Logger, org.echocat.jomon.runtime.logging.LogLevel) method except that the marker data is also taken into account.marker - The marker data to take into considerationtrue if this Logger is enabled for the given level, false otherwise.public static void log(@Nonnull
org.slf4j.Logger logger,
@Nonnull
LogLevel level,
@Nonnull
org.slf4j.Marker marker,
@Nullable
java.lang.String msg)
level.marker - the marker data specific to this log statementmsg - the message string to be loggedpublic static void log(@Nonnull
org.slf4j.Logger logger,
@Nonnull
LogLevel level,
@Nonnull
org.slf4j.Marker marker,
@Nonnull
java.lang.String format,
@Nullable
java.lang.Object arg)
log(Logger, LogLevel, 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 static void log(@Nonnull
org.slf4j.Logger logger,
@Nonnull
LogLevel level,
@Nonnull
org.slf4j.Marker marker,
@Nonnull
java.lang.String format,
@Nullable
java.lang.Object arg1,
@Nullable
java.lang.Object arg2)
log(Logger, LogLevel, 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 static void log(@Nonnull
org.slf4j.Logger logger,
@Nonnull
LogLevel level,
@Nonnull
org.slf4j.Marker marker,
@Nonnull
java.lang.String format,
@Nullable
java.lang.Object... arguments)
log(Logger, LogLevel, String, Object...) method except that the marker data is also taken into consideration.marker - the marker data specific to this log statementformat - the format stringarguments - an array of argumentspublic static void log(@Nonnull
org.slf4j.Logger logger,
@Nonnull
LogLevel level,
@Nonnull
org.slf4j.Marker marker,
@Nullable
java.lang.String msg,
@Nullable
java.lang.Throwable t)
log(Logger, LogLevel, 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 echocat. All Rights Reserved.