Package icyllis.modernui.util
Class Log
java.lang.Object
icyllis.modernui.util.Log
Framework wrapper over SLF4J API for sending log output.
Since 3.12.0, the ModernUI framework uses SLF4J for logging, applications should use their own logging API implementation.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
A general debugging event.static final int
An error in the application, possibly recoverable.static final int
An event for informational purposes.static final int
A fine-grained debug message, typically capturing the flow through the application.static final int
An event that might possible lead to an error. -
Method Summary
Modifier and TypeMethodDescriptionstatic void
Logs a message object with theDEBUG
level.static void
static void
Logs a message object with theERROR
level.static void
static void
Logs a message object with theINFO
level.static void
static boolean
isLoggable
(org.slf4j.Marker marker, int level) Checks to see whether a log for the specified tag is enabled at the specified level.static void
Logs a message.static void
Logs a lazily constructed message.static void
Logs a message object with theVERBOSE
level.static void
static void
Logs a message object with theWARN
level.static void
static void
What a Terrible Failure: Report an exception that should never happen.
-
Field Details
-
VERBOSE
public static final int VERBOSEA fine-grained debug message, typically capturing the flow through the application.- See Also:
-
DEBUG
public static final int DEBUGA general debugging event.- See Also:
-
INFO
public static final int INFOAn event for informational purposes.- See Also:
-
WARN
public static final int WARNAn event that might possible lead to an error.- See Also:
-
ERROR
public static final int ERRORAn error in the application, possibly recoverable.- See Also:
-
-
Method Details
-
v
Logs a message object with theVERBOSE
level.- Parameters:
marker
- used to identify the source of a log message.message
- the message string to log.
-
v
public static void v(@Nullable org.slf4j.Marker marker, @Nullable Object message, Throwable throwable) Logs a message at theVERBOSE
level including the stack trace of theThrowable
throwable
passed as parameter.- Parameters:
marker
- used to identify the source of a log message.message
- the message string to log.throwable
- theThrowable
to log, including its stack trace.
-
d
Logs a message object with theDEBUG
level.- Parameters:
marker
- used to identify the source of a log message.message
- the message string to log.
-
d
public static void d(@Nullable org.slf4j.Marker marker, @Nullable Object message, Throwable throwable) Logs a message at theDEBUG
level including the stack trace of theThrowable
throwable
passed as parameter.- Parameters:
marker
- used to identify the source of a log message.message
- the message string to log.throwable
- theThrowable
to log, including its stack trace.
-
i
Logs a message object with theINFO
level.- Parameters:
marker
- used to identify the source of a log message.message
- the message string to log.
-
i
public static void i(@Nullable org.slf4j.Marker marker, @Nullable Object message, Throwable throwable) Logs a message at theINFO
level including the stack trace of theThrowable
throwable
passed as parameter.- Parameters:
marker
- used to identify the source of a log message.message
- the message string to log.throwable
- theThrowable
to log, including its stack trace.
-
w
Logs a message object with theWARN
level.- Parameters:
marker
- used to identify the source of a log message.message
- the message string to log.
-
w
public static void w(@Nullable org.slf4j.Marker marker, @Nullable Object message, Throwable throwable) Logs a message at theWARN
level including the stack trace of theThrowable
throwable
passed as parameter.- Parameters:
marker
- used to identify the source of a log message.message
- the message string to log.throwable
- theThrowable
to log, including its stack trace.
-
isLoggable
Checks to see whether a log for the specified tag is enabled at the specified level. -
e
Logs a message object with theERROR
level.- Parameters:
marker
- used to identify the source of a log message.message
- the message string to log.
-
e
public static void e(@Nullable org.slf4j.Marker marker, @Nullable Object message, Throwable throwable) Logs a message at theERROR
level including the stack trace of theThrowable
throwable
passed as parameter.- Parameters:
marker
- used to identify the source of a log message.message
- the message string to log.throwable
- theThrowable
to log, including its stack trace.
-
wtf
public static void wtf(@Nullable org.slf4j.Marker marker, @Nullable String message, @Nullable Throwable throwable) What a Terrible Failure: Report an exception that should never happen.- Parameters:
marker
- The marker specific to the statement.message
- The message you would like logged.throwable
- An exception to log. May be null.
-
println
Logs a message.- Parameters:
level
- The logging level.marker
- Used to identify the source of a log message.message
- The message String.
-
println
public static void println(int level, @Nullable org.slf4j.Marker marker, @Nullable Supplier<?> messageSupplier) Logs a lazily constructed message. The supplier is called only if the logging level is enabled.- Parameters:
level
- The logging level.marker
- Used to identify the source of a log message.messageSupplier
- A supplier that produces a log message when called.
-