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 intA general debugging event.static final intAn error in the application, possibly recoverable.static final intAn event for informational purposes.static final intA fine-grained debug message, typically capturing the flow through the application.static final intAn event that might possible lead to an error. -
Method Summary
Modifier and TypeMethodDescriptionstatic voidLogs a message object with theDEBUGlevel.static voidstatic voidLogs a message object with theERRORlevel.static voidstatic voidLogs a message object with theINFOlevel.static voidstatic booleanisLoggable(org.slf4j.Marker marker, int level) Checks to see whether a log for the specified tag is enabled at the specified level.static voidLogs a message.static voidLogs a lazily constructed message.static voidLogs a message object with theVERBOSElevel.static voidstatic voidLogs a message object with theWARNlevel.static voidstatic voidWhat 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 theVERBOSElevel.- 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 theVERBOSElevel including the stack trace of theThrowablethrowablepassed as parameter.- Parameters:
marker- used to identify the source of a log message.message- the message string to log.throwable- theThrowableto log, including its stack trace.
-
d
Logs a message object with theDEBUGlevel.- 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 theDEBUGlevel including the stack trace of theThrowablethrowablepassed as parameter.- Parameters:
marker- used to identify the source of a log message.message- the message string to log.throwable- theThrowableto log, including its stack trace.
-
i
Logs a message object with theINFOlevel.- 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 theINFOlevel including the stack trace of theThrowablethrowablepassed as parameter.- Parameters:
marker- used to identify the source of a log message.message- the message string to log.throwable- theThrowableto log, including its stack trace.
-
w
Logs a message object with theWARNlevel.- 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 theWARNlevel including the stack trace of theThrowablethrowablepassed as parameter.- Parameters:
marker- used to identify the source of a log message.message- the message string to log.throwable- theThrowableto 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 theERRORlevel.- 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 theERRORlevel including the stack trace of theThrowablethrowablepassed as parameter.- Parameters:
marker- used to identify the source of a log message.message- the message string to log.throwable- theThrowableto 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.
-