Interface Logger


public interface Logger
Defines a logging interface with methods for logging at various levels such as trace, debug, info, warn, and error. Provides methods to check if a specific logging level is enabled, allowing conditional logging based on the current configuration.
Since:
2.5.0
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    debug(String message, Object... args)
    Logs a message at the debug level.
    void
    error(String message, Object... args)
    Logs a message at the error level.
    void
    error(String message, Throwable throwable, Object... args)
    Logs a message and a throwable at the error level.
    void
    info(String message, Object... args)
    Logs a message at the info level.
    boolean
    Returns whether debug logging is enabled.
    boolean
    Returns whether error logging is enabled.
    boolean
    Returns whether info logging is enabled.
    boolean
    Returns whether trace logging is enabled.
    boolean
    Returns whether warn logging is enabled.
    void
    trace(String message, Object... args)
    Logs a message at the trace level.
    void
    warn(String message, Object... args)
    Logs a message at the warn level.
    void
    warn(String message, Throwable throwable, Object... args)
    Logs a message and a throwable at the warn level.
  • Method Details

    • isTraceEnabled

      boolean isTraceEnabled()
      Returns whether trace logging is enabled.
      Returns:
      true if trace is enabled, false otherwise
      Since:
      2.5.0
    • isDebugEnabled

      boolean isDebugEnabled()
      Returns whether debug logging is enabled.
      Returns:
      true if debug is enabled, false otherwise
      Since:
      2.5.0
    • isInfoEnabled

      boolean isInfoEnabled()
      Returns whether info logging is enabled.
      Returns:
      true if info is enabled, false otherwise
      Since:
      2.5.0
    • isWarnEnabled

      boolean isWarnEnabled()
      Returns whether warn logging is enabled.
      Returns:
      true if warn is enabled, false otherwise
      Since:
      2.5.0
    • isErrorEnabled

      boolean isErrorEnabled()
      Returns whether error logging is enabled.
      Returns:
      true if error is enabled, false otherwise
      Since:
      2.5.0
    • trace

      void trace(String message, Object... args)
      Logs a message at the trace level.
      Parameters:
      message - the message to log
      args - the arguments to format the message
      Since:
      2.5.0
    • debug

      void debug(String message, Object... args)
      Logs a message at the debug level.
      Parameters:
      message - the message to log
      args - the arguments to format the message
      Since:
      2.5.0
    • info

      void info(String message, Object... args)
      Logs a message at the info level.
      Parameters:
      message - the message to log
      args - the arguments to format the message
      Since:
      2.5.0
    • warn

      void warn(String message, Object... args)
      Logs a message at the warn level.
      Parameters:
      message - the message to log
      args - the arguments to format the message
      Since:
      2.5.0
    • error

      void error(String message, Object... args)
      Logs a message at the error level.
      Parameters:
      message - the message to log
      args - the arguments to format the message
      Since:
      2.5.0
    • warn

      void warn(String message, Throwable throwable, Object... args)
      Logs a message and a throwable at the warn level.
      Parameters:
      message - the message to log
      throwable - the throwable to log
      args - the arguments to format the message
      Since:
      2.5.0
    • error

      void error(String message, Throwable throwable, Object... args)
      Logs a message and a throwable at the error level.
      Parameters:
      message - the message to log
      throwable - the throwable to log
      args - the arguments to format the message
      Since:
      2.5.0