Interface Logger


@GwtCompatible @NonExtendable public interface Logger
Interface that describes a general logger that is capable of logging with different severity levels.
Since:
4.2.38
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static enum 
    A LogLevel is used to describe the severity of an event that is being logged.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    isDebugEnabled(@NotNull Class<?> logger)
    Checks whether logging with debug level is enabled for the supplied class.
    boolean
    isDebugEnabled(@NotNull String name)
    Checks whether logging with debug level is enabled for the supplied logger name.
    boolean
    isInfoEnabled(@NotNull Class<?> logger)
    Checks whether logging with info level is enabled for the supplied class.
    boolean
    isInfoEnabled(@NotNull String name)
    Checks whether logging with info level is enabled for the supplied logger name.
    boolean
    isTraceEnabled(@NotNull Class<?> logger)
    Checks whether logging with trace level is enabled for the supplied class.
    boolean
    isTraceEnabled(@NotNull String name)
    Checks whether logging with trace level is enabled for the supplied logger name.
    boolean
    isWarnEnabled(@NotNull Class<?> logger)
    Checks whether logging with warn level is enabled for the supplied class.
    boolean
    isWarnEnabled(@NotNull String name)
    Checks whether logging with warn level is enabled for the supplied logger name.
    void
    logDebug(@NotNull String message, @NotNull Class<?> logger)
    Logs a message with debug level using the logger for the supplied class.
    void
    logDebug(@NotNull String message, @NotNull String name)
    Logs a message with debug level using the logger with the supplied name.
    void
    logDebug(@NotNull String message, @NotNull Throwable cause, @NotNull Class<?> logger)
    Logs a message as well as the supplied Throwable with debug level using the logger for the supplied class.
    void
    logDebug(@NotNull String message, @NotNull Throwable cause, @NotNull String name)
    Logs a message as well as the supplied Throwable with debug level using the logger with the supplied name.
    void
    logError(@NotNull String message, @NotNull Class<?> logger)
    Logs a message with error level using the logger for the supplied class.
    void
    logError(@NotNull String message, @NotNull String name)
    Logs a message with error level using the logger with the supplied name.
    void
    logError(@NotNull String message, @NotNull Throwable cause, @NotNull Class<?> logger)
    Logs a message as well as the supplied Throwable with error level using the logger for the supplied class.
    void
    logError(@NotNull String message, @NotNull Throwable cause, @NotNull String name)
    Logs a message as well as the supplied Throwable with error level using the logger with the supplied name.
    void
    logFatal(@NotNull String message, @NotNull Class<?> logger)
    Logs a message with fatal level using the logger for the supplied class.
    void
    logFatal(@NotNull String message, @NotNull String name)
    Logs a message with fatal level using the logger with the supplied name.
    void
    logFatal(@NotNull String message, @NotNull Throwable cause, @NotNull Class<?> logger)
    Logs a message as well as the supplied Throwable with fatal level using the logger for the supplied class.
    void
    logFatal(@NotNull String message, @NotNull Throwable cause, @NotNull String name)
    Logs a message as well as the supplied Throwable with fatal level using the logger with the supplied name.
    void
    logInfo(@NotNull String message, @NotNull Class<?> logger)
    Logs a message with info level using the logger for the supplied class.
    void
    logInfo(@NotNull String message, @NotNull String name)
    Logs a message with info level using the logger with the supplied name.
    void
    logInfo(@NotNull String message, @NotNull Throwable cause, @NotNull Class<?> logger)
    Logs a message as well as the supplied Throwable with info level using the logger for the supplied class.
    void
    logInfo(@NotNull String message, @NotNull Throwable cause, @NotNull String name)
    Logs a message as well as the supplied Throwable with info level using the logger with the supplied name.
    void
    logTrace(@NotNull String message, @NotNull Class<?> logger)
    Logs a message with trace level using the logger for the supplied class.
    void
    logTrace(@NotNull String message, @NotNull String name)
    Logs a message with trace level using the logger with the supplied name.
    void
    logTrace(@NotNull String message, @NotNull Throwable cause, @NotNull String name)
    Logs a message as well as the supplied Throwable with trace level using the logger with the supplied name.
    void
    logTrace(@NotNull String message, @NotNull Throwable cause, Class<?> logger)
    Logs a message as well as the supplied Throwable with trace level using the logger for the supplied class.
    void
    logWarning(@NotNull String message, @NotNull Class<?> logger)
    Logs a message with warn level using the logger for the supplied class.
    void
    logWarning(@NotNull String message, @NotNull String name)
    Logs a message with warn level using the logger with the supplied name.
    void
    logWarning(@NotNull String message, @NotNull Throwable cause, @NotNull Class<?> logger)
    Logs a message as well as the supplied Throwable with warn level using the logger for the supplied class.
    void
    logWarning(@NotNull String message, @NotNull Throwable cause, @NotNull String name)
    Logs a message as well as the supplied Throwable with warn level using the logger with the supplied name.
  • Method Details

    • isTraceEnabled

      boolean isTraceEnabled(@NotNull @NotNull Class<?> logger)
      Checks whether logging with trace level is enabled for the supplied class. This method can be used to prevent unnecessary expensive message creation if the level is not enabled.
      Parameters:
      logger - Class to be checked.
      Returns:
      true if logging with trace level is enabled for the supplied class, false otherwise.
      Since:
      4.2.38
    • isTraceEnabled

      boolean isTraceEnabled(@NotNull @NotNull String name)
      Checks whether logging with trace level is enabled for the supplied logger name. This method can be used to prevent unnecessary expensive message creation if the level is not enabled.
      Parameters:
      name - Logger name to be checked.
      Returns:
      true if logging with trace level is enabled for the supplied logger name, false otherwise.
      Since:
      5.2.230406
    • logTrace

      void logTrace(@NotNull @NotNull String message, @NotNull @NotNull Class<?> logger)
      Logs a message with trace level using the logger for the supplied class.
      Parameters:
      message - Message to be logged.
      logger - Class to find the logger to be used.
      Since:
      4.2.38
    • logTrace

      void logTrace(@NotNull @NotNull String message, @NotNull @NotNull String name)
      Logs a message with trace level using the logger with the supplied name.
      Parameters:
      message - Message to be logged.
      name - Name of the logger to be used.
      Since:
      5.2.230406
    • logTrace

      void logTrace(@NotNull @NotNull String message, @NotNull @NotNull Throwable cause, Class<?> logger)
      Logs a message as well as the supplied Throwable with trace level using the logger for the supplied class.
      Parameters:
      message - Message to be logged.
      cause - Throwable to be logged, including its stack trace.
      logger - Class to find the logger to be used.
      Since:
      4.2.38
    • logTrace

      void logTrace(@NotNull @NotNull String message, @NotNull @NotNull Throwable cause, @NotNull @NotNull String name)
      Logs a message as well as the supplied Throwable with trace level using the logger with the supplied name.
      Parameters:
      message - Message to be logged.
      cause - Throwable to be logged, including its stack trace.
      name - Name of the logger to be used.
      Since:
      5.2.230406
    • isDebugEnabled

      boolean isDebugEnabled(@NotNull @NotNull Class<?> logger)
      Checks whether logging with debug level is enabled for the supplied class. This method can be used to prevent unnecessary expensive message creation if the level is not enabled.
      Parameters:
      logger - Class to be checked.
      Returns:
      true if logging with debug level is enabled for the supplied class, false otherwise.
      Since:
      4.2.38
    • isDebugEnabled

      boolean isDebugEnabled(@NotNull @NotNull String name)
      Checks whether logging with debug level is enabled for the supplied logger name. This method can be used to prevent unnecessary expensive message creation if the level is not enabled.
      Parameters:
      name - Logger name to be checked.
      Returns:
      true if logging with debug level is enabled for the supplied logger name, false otherwise.
      Since:
      5.2.230406
    • logDebug

      void logDebug(@NotNull @NotNull String message, @NotNull @NotNull Throwable cause, @NotNull @NotNull Class<?> logger)
      Logs a message as well as the supplied Throwable with debug level using the logger for the supplied class.
      Parameters:
      message - Message to be logged.
      cause - Throwable to be logged, including its stack trace.
      logger - Class to find the logger to be used.
      Since:
      4.2.38
    • logDebug

      void logDebug(@NotNull @NotNull String message, @NotNull @NotNull Throwable cause, @NotNull @NotNull String name)
      Logs a message as well as the supplied Throwable with debug level using the logger with the supplied name.
      Parameters:
      message - Message to be logged.
      cause - Throwable to be logged, including its stack trace.
      name - Name of the logger to be used.
      Since:
      5.2.230406
    • logDebug

      void logDebug(@NotNull @NotNull String message, @NotNull @NotNull Class<?> logger)
      Logs a message with debug level using the logger for the supplied class.
      Parameters:
      message - Message to be logged.
      logger - Class to find the logger to be used.
      Since:
      4.2.38
    • logDebug

      void logDebug(@NotNull @NotNull String message, @NotNull @NotNull String name)
      Logs a message with debug level using the logger with the supplied name.
      Parameters:
      message - Message to be logged.
      name - Name of the logger to be used.
      Since:
      5.2.230406
    • isInfoEnabled

      boolean isInfoEnabled(@NotNull @NotNull Class<?> logger)
      Checks whether logging with info level is enabled for the supplied class. This method can be used to prevent unnecessary expensive message creation if the level is not enabled.
      Parameters:
      logger - Class to be checked.
      Returns:
      true if logging with info level is enabled for the supplied class, false otherwise.
      Since:
      4.2.38
    • isInfoEnabled

      boolean isInfoEnabled(@NotNull @NotNull String name)
      Checks whether logging with info level is enabled for the supplied logger name. This method can be used to prevent unnecessary expensive message creation if the level is not enabled.
      Parameters:
      name - Logger name to be checked.
      Returns:
      true if logging with info level is enabled for the supplied logger name, false otherwise.
      Since:
      5.2.230406
    • logInfo

      void logInfo(@NotNull @NotNull String message, @NotNull @NotNull Throwable cause, @NotNull @NotNull Class<?> logger)
      Logs a message as well as the supplied Throwable with info level using the logger for the supplied class.
      Parameters:
      message - Message to be logged.
      cause - Throwable to be logged, including its stack trace.
      logger - Class to find the logger to be used.
      Since:
      4.2.38
    • logInfo

      void logInfo(@NotNull @NotNull String message, @NotNull @NotNull Throwable cause, @NotNull @NotNull String name)
      Logs a message as well as the supplied Throwable with info level using the logger with the supplied name.
      Parameters:
      message - Message to be logged.
      cause - Throwable to be logged, including its stack trace.
      name - Name of the logger to be used.
      Since:
      5.2.230406
    • logInfo

      void logInfo(@NotNull @NotNull String message, @NotNull @NotNull Class<?> logger)
      Logs a message with info level using the logger for the supplied class.
      Parameters:
      message - Message to be logged.
      logger - Class to find the logger to be used.
      Since:
      4.2.38
    • logInfo

      void logInfo(@NotNull @NotNull String message, @NotNull @NotNull String name)
      Logs a message with info level using the logger with the supplied name.
      Parameters:
      message - Message to be logged.
      name - Name of the logger to be used.
      Since:
      5.2.230406
    • isWarnEnabled

      boolean isWarnEnabled(@NotNull @NotNull Class<?> logger)
      Checks whether logging with warn level is enabled for the supplied class. This method can be used to prevent unnecessary expensive message creation if the level is not enabled.
      Parameters:
      logger - Class to be checked.
      Returns:
      true if logging with warn level is enabled for the supplied class, false otherwise.
      Since:
      4.2.38
    • isWarnEnabled

      boolean isWarnEnabled(@NotNull @NotNull String name)
      Checks whether logging with warn level is enabled for the supplied logger name. This method can be used to prevent unnecessary expensive message creation if the level is not enabled.
      Parameters:
      name - Logger name to be checked.
      Returns:
      true if logging with warn level is enabled for the supplied logger name, false otherwise.
      Since:
      5.2.230406
    • logWarning

      void logWarning(@NotNull @NotNull String message, @NotNull @NotNull Throwable cause, @NotNull @NotNull Class<?> logger)
      Logs a message as well as the supplied Throwable with warn level using the logger for the supplied class.
      Parameters:
      message - Message to be logged.
      cause - Throwable to be logged, including its stack trace.
      logger - Class to find the logger to be used.
      Since:
      4.2.38
    • logWarning

      void logWarning(@NotNull @NotNull String message, @NotNull @NotNull Throwable cause, @NotNull @NotNull String name)
      Logs a message as well as the supplied Throwable with warn level using the logger with the supplied name.
      Parameters:
      message - Message to be logged.
      cause - Throwable to be logged, including its stack trace.
      name - Name of the logger to be used.
      Since:
      5.2.230406
    • logWarning

      void logWarning(@NotNull @NotNull String message, @NotNull @NotNull Class<?> logger)
      Logs a message with warn level using the logger for the supplied class.
      Parameters:
      message - Message to be logged.
      logger - Class to find the logger to be used.
      Since:
      4.2.38
    • logWarning

      void logWarning(@NotNull @NotNull String message, @NotNull @NotNull String name)
      Logs a message with warn level using the logger with the supplied name.
      Parameters:
      message - Message to be logged.
      name - Name of the logger to be used.
      Since:
      5.2.230406
    • logError

      void logError(@NotNull @NotNull String message, @NotNull @NotNull Throwable cause, @NotNull @NotNull Class<?> logger)
      Logs a message as well as the supplied Throwable with error level using the logger for the supplied class.
      Parameters:
      message - Message to be logged.
      cause - Throwable to be logged, including its stack trace.
      logger - Class to find the logger to be used.
      Since:
      4.2.38
    • logError

      void logError(@NotNull @NotNull String message, @NotNull @NotNull Throwable cause, @NotNull @NotNull String name)
      Logs a message as well as the supplied Throwable with error level using the logger with the supplied name.
      Parameters:
      message - Message to be logged.
      cause - Throwable to be logged, including its stack trace.
      name - Name of the logger to be used.
      Since:
      5.2.230406
    • logError

      void logError(@NotNull @NotNull String message, @NotNull @NotNull Class<?> logger)
      Logs a message with error level using the logger for the supplied class.
      Parameters:
      message - Message to be logged.
      logger - Class to find the logger to be used.
      Since:
      4.2.38
    • logError

      void logError(@NotNull @NotNull String message, @NotNull @NotNull String name)
      Logs a message with error level using the logger with the supplied name.
      Parameters:
      message - Message to be logged.
      name - Name of the logger to be used.
      Since:
      5.2.230406
    • logFatal

      void logFatal(@NotNull @NotNull String message, @NotNull @NotNull Class<?> logger)
      Logs a message with fatal level using the logger for the supplied class.
      Parameters:
      message - Message to be logged.
      logger - Class to find the logger to be used.
      Since:
      4.2.38
    • logFatal

      void logFatal(@NotNull @NotNull String message, @NotNull @NotNull String name)
      Logs a message with fatal level using the logger with the supplied name.
      Parameters:
      message - Message to be logged.
      name - Name of the logger to be used.
      Since:
      5.2.230406
    • logFatal

      void logFatal(@NotNull @NotNull String message, @NotNull @NotNull Throwable cause, @NotNull @NotNull Class<?> logger)
      Logs a message as well as the supplied Throwable with fatal level using the logger for the supplied class.
      Parameters:
      message - Message to be logged.
      cause - Throwable to be logged, including its stack trace.
      logger - Class to find the logger to be used.
      Since:
      4.2.38
    • logFatal

      void logFatal(@NotNull @NotNull String message, @NotNull @NotNull Throwable cause, @NotNull @NotNull String name)
      Logs a message as well as the supplied Throwable with fatal level using the logger with the supplied name.
      Parameters:
      message - Message to be logged.
      cause - Throwable to be logged, including its stack trace.
      name - Name of the logger to be used.
      Since:
      5.2.230406