Class Log

java.lang.Object
icyllis.modernui.util.Log

public final class Log extends Object
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

    Fields
    Modifier and Type
    Field
    Description
    static 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 Type
    Method
    Description
    static void
    d(org.slf4j.Marker marker, Object message)
    Logs a message object with the DEBUG level.
    static void
    d(org.slf4j.Marker marker, Object message, Throwable throwable)
    Logs a message at the DEBUG level including the stack trace of the Throwable throwable passed as parameter.
    static void
    e(org.slf4j.Marker marker, Object message)
    Logs a message object with the ERROR level.
    static void
    e(org.slf4j.Marker marker, Object message, Throwable throwable)
    Logs a message at the ERROR level including the stack trace of the Throwable throwable passed as parameter.
    static void
    i(org.slf4j.Marker marker, Object message)
    Logs a message object with the INFO level.
    static void
    i(org.slf4j.Marker marker, Object message, Throwable throwable)
    Logs a message at the INFO level including the stack trace of the Throwable throwable passed as parameter.
    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
    println(int level, org.slf4j.Marker marker, Object message)
    Logs a message.
    static void
    println(int level, org.slf4j.Marker marker, Supplier<?> messageSupplier)
    Logs a lazily constructed message.
    static void
    v(org.slf4j.Marker marker, Object message)
    Logs a message object with the VERBOSE level.
    static void
    v(org.slf4j.Marker marker, Object message, Throwable throwable)
    Logs a message at the VERBOSE level including the stack trace of the Throwable throwable passed as parameter.
    static void
    w(org.slf4j.Marker marker, Object message)
    Logs a message object with the WARN level.
    static void
    w(org.slf4j.Marker marker, Object message, Throwable throwable)
    Logs a message at the WARN level including the stack trace of the Throwable throwable passed as parameter.
    static void
    wtf(org.slf4j.Marker marker, String message, Throwable throwable)
    What a Terrible Failure: Report an exception that should never happen.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • VERBOSE

      public static final int VERBOSE
      A fine-grained debug message, typically capturing the flow through the application.
      See Also:
    • DEBUG

      public static final int DEBUG
      A general debugging event.
      See Also:
    • INFO

      public static final int INFO
      An event for informational purposes.
      See Also:
    • WARN

      public static final int WARN
      An event that might possible lead to an error.
      See Also:
    • ERROR

      public static final int ERROR
      An error in the application, possibly recoverable.
      See Also:
  • Method Details

    • v

      public static void v(@Nullable org.slf4j.Marker marker, @Nullable Object message)
      Logs a message object with the VERBOSE 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 the VERBOSE level including the stack trace of the Throwable throwable passed as parameter.
      Parameters:
      marker - used to identify the source of a log message.
      message - the message string to log.
      throwable - the Throwable to log, including its stack trace.
    • d

      public static void d(@Nullable org.slf4j.Marker marker, @Nullable Object message)
      Logs a message object with the DEBUG 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 the DEBUG level including the stack trace of the Throwable throwable passed as parameter.
      Parameters:
      marker - used to identify the source of a log message.
      message - the message string to log.
      throwable - the Throwable to log, including its stack trace.
    • i

      public static void i(@Nullable org.slf4j.Marker marker, @Nullable Object message)
      Logs a message object with the INFO 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 the INFO level including the stack trace of the Throwable throwable passed as parameter.
      Parameters:
      marker - used to identify the source of a log message.
      message - the message string to log.
      throwable - the Throwable to log, including its stack trace.
    • w

      public static void w(@Nullable org.slf4j.Marker marker, @Nullable Object message)
      Logs a message object with the WARN 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 the WARN level including the stack trace of the Throwable throwable passed as parameter.
      Parameters:
      marker - used to identify the source of a log message.
      message - the message string to log.
      throwable - the Throwable to log, including its stack trace.
    • isLoggable

      public static boolean isLoggable(@Nullable org.slf4j.Marker marker, int level)
      Checks to see whether a log for the specified tag is enabled at the specified level.
    • e

      public static void e(@Nullable org.slf4j.Marker marker, @Nullable Object message)
      Logs a message object with the ERROR 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 the ERROR level including the stack trace of the Throwable throwable passed as parameter.
      Parameters:
      marker - used to identify the source of a log message.
      message - the message string to log.
      throwable - the Throwable 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

      public static void println(int level, @Nullable org.slf4j.Marker marker, @Nullable Object message)
      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.