Interface Logger


@GwtCompatible 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(Class<?> logger)
    Checks whether logging with debug level is enabled for the supplied class.
    boolean
    isInfoEnabled(Class<?> logger)
    Checks whether logging with info level is enabled for the supplied class.
    boolean
    isTraceEnabled(Class<?> logger)
    Checks whether logging with trace level is enabled for the supplied class.
    boolean
    isWarnEnabled(Class<?> logger)
    Checks whether logging with warn level is enabled for the supplied class.
    void
    logDebug(String message, Class<?> logger)
    Logs a message with debug level using the logger for the supplied class.
    void
    logDebug(String message, Throwable cause, Class<?> logger)
    Logs a message as well as the supplied Throwable with debug level using the logger for the supplied class.
    void
    logError(String message, Class<?> logger)
    Logs a message with error level using the logger for the supplied class.
    void
    logError(String message, Throwable cause, Class<?> logger)
    Logs a message as well as the supplied Throwable with error level using the logger for the supplied class.
    void
    logFatal(String message, Class<?> logger)
    Logs a message with fatal level using the logger for the supplied class.
    void
    logFatal(String message, Throwable cause, Class<?> logger)
    Logs a message as well as the supplied Throwable with fatal level using the logger for the supplied class.
    void
    logInfo(String message, Class<?> logger)
    Logs a message with info level using the logger for the supplied class.
    void
    logInfo(String message, Throwable cause, Class<?> logger)
    Logs a message as well as the supplied Throwable with info level using the logger for the supplied class.
    void
    logTrace(String message, Class<?> logger)
    Logs a message with trace level using the logger for the supplied class.
    void
    logTrace(String message, 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(String message, Class<?> logger)
    Logs a message with warn level using the logger for the supplied class.
    void
    logWarning(String message, Throwable cause, Class<?> logger)
    Logs a message as well as the supplied Throwable with warn level using the logger for the supplied class.
  • Method Details

    • isTraceEnabled

      boolean isTraceEnabled(@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
    • logTrace

      void logTrace(@NotNull String message, @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 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.
      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
    • isDebugEnabled

      boolean isDebugEnabled(@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
    • logDebug

      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.
      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 String message, @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
    • isInfoEnabled

      boolean isInfoEnabled(@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
    • logInfo

      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.
      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 String message, @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
    • isWarnEnabled

      boolean isWarnEnabled(@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
    • logWarning

      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.
      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 String message, @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
    • logError

      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.
      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 String message, @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
    • logFatal

      void logFatal(@NotNull String message, @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 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.
      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