Interface InvokerLogger

All Known Implementing Classes:
PrintStreamLogger, SystemOutLogger

public interface InvokerLogger
A logger used by Invoker instances to output diagnostic messages.
Author:
Jason van Zyl
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    The threshold for debug output.
    static final int
    The threshold for error output.
    static final int
    The threshold for fatal error output.
    static final int
    The threshold for info output.
    static final int
    The threshold for warn output.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    debug(String message)
    Logs the specified debug message.
    void
    debug(String message, Throwable throwable)
    Logs the specified debug message and the accompanying exception.
    void
    error(String message)
    Logs the specified error message.
    void
    error(String message, Throwable throwable)
    Logs the specified error message and the accompanying exception.
    void
    fatalError(String message)
    Logs the specified fatal error message.
    void
    fatalError(String message, Throwable throwable)
    Logs the specified fatal error message and the accompanying exception.
    int
    Gets the logger's threshold.
    void
    info(String message)
    Logs the specified info message.
    void
    info(String message, Throwable throwable)
    Logs the specified info message and the accompanying exception.
    boolean
    Tests whether debug output is enabled for this logger.
    boolean
    Tests whether error output is enabled for this logger.
    boolean
    Tests whether fatal error output is enabled for this logger.
    boolean
    Tests whether info output is enabled for this logger.
    boolean
    Tests whether warn output is enabled for this logger.
    void
    setThreshold(int threshold)
    Sets the logger's threshold.
    void
    warn(String message)
    Logs the specified warning message.
    void
    warn(String message, Throwable throwable)
    Logs the specified warning message and the accompanying exception.
  • Field Details

  • Method Details

    • debug

      void debug(String message)
      Logs the specified debug message.
      Parameters:
      message - The message to log, may be null.
    • debug

      void debug(String message, Throwable throwable)
      Logs the specified debug message and the accompanying exception.
      Parameters:
      message - The message to log, may be null.
      throwable - The exception to log, may be null.
    • isDebugEnabled

      boolean isDebugEnabled()
      Tests whether debug output is enabled for this logger.
      Returns:
      true if messages with priority "debug" or above are logged, false otherwise.
    • info

      void info(String message)
      Logs the specified info message.
      Parameters:
      message - The message to log, may be null.
    • info

      void info(String message, Throwable throwable)
      Logs the specified info message and the accompanying exception.
      Parameters:
      message - The message to log, may be null.
      throwable - The exception to log, may be null.
    • isInfoEnabled

      boolean isInfoEnabled()
      Tests whether info output is enabled for this logger.
      Returns:
      true if messages with priority "info" or above are logged, false otherwise.
    • warn

      void warn(String message)
      Logs the specified warning message.
      Parameters:
      message - The message to log, may be null.
    • warn

      void warn(String message, Throwable throwable)
      Logs the specified warning message and the accompanying exception.
      Parameters:
      message - The message to log, may be null.
      throwable - The exception to log, may be null.
    • isWarnEnabled

      boolean isWarnEnabled()
      Tests whether warn output is enabled for this logger.
      Returns:
      true if messages with priority "warn" or above are logged, false otherwise.
    • error

      void error(String message)
      Logs the specified error message.
      Parameters:
      message - The message to log, may be null.
    • error

      void error(String message, Throwable throwable)
      Logs the specified error message and the accompanying exception.
      Parameters:
      message - The message to log, may be null.
      throwable - The exception to log, may be null.
    • isErrorEnabled

      boolean isErrorEnabled()
      Tests whether error output is enabled for this logger.
      Returns:
      true if messages with priority "error" or above are logged, false otherwise.
    • fatalError

      void fatalError(String message)
      Logs the specified fatal error message.
      Parameters:
      message - The message to log, may be null.
    • fatalError

      void fatalError(String message, Throwable throwable)
      Logs the specified fatal error message and the accompanying exception.
      Parameters:
      message - The message to log, may be null.
      throwable - The exception to log, may be null.
    • isFatalErrorEnabled

      boolean isFatalErrorEnabled()
      Tests whether fatal error output is enabled for this logger.
      Returns:
      true if messages with priority "fatal" or above are logged, false otherwise.
    • setThreshold

      void setThreshold(int threshold)
      Sets the logger's threshold.
      Parameters:
      threshold - The logger's threshold, must be one of DEBUG, INFO, WARN, ERROR and FATAL.
    • getThreshold

      int getThreshold()
      Gets the logger's threshold.
      Returns:
      The logger's threshold, one of DEBUG, INFO, WARN, ERROR and FATAL.