Interface Logging

All Known Implementing Classes:
DefaultLogging

public interface Logging
Logging interface
Author:
Leonard Woo
  • Field Details

    • LEVEL_TRACE_INT

      static final int LEVEL_TRACE_INT
      "TRACE" level logging.
      See Also:
    • LEVEL_DEBUG_INT

      static final int LEVEL_DEBUG_INT
      "DEBUG" level logging.
      See Also:
    • LEVEL_INFO_INT

      static final int LEVEL_INFO_INT
      "INFO" level logging.
      See Also:
    • LEVEL_WARN_INT

      static final int LEVEL_WARN_INT
      "WARN" level logging.
      See Also:
    • LEVEL_ERROR_INT

      static final int LEVEL_ERROR_INT
      "ERROR" level logging.
      See Also:
    • LEVEL_FATAL_INT

      static final int LEVEL_FATAL_INT
      "FATAL" level logging.
      See Also:
  • Method Details

    • getName

      String getName()
      Get logging name
      Returns:
      logging name.
    • isEnable

      boolean isEnable(int level)
      Checks whether this Logger is enabled for the given Level.
      Parameters:
      level - the Level to check.
      Returns:
      boolean - true if this Logger is enabled for level, false otherwise.
    • log

      void log(int level, CharSequence message)
      Logs a message with the specific Marker at the given level.
      Parameters:
      level - the logging level.
      message - the message string to be logged.
    • log

      void log(int level, CharSequence message, Throwable cause)
      Logs a message with the specific Marker at the given level.
      Parameters:
      level - the logging level.
      message - the message string to be logged.
      cause - A Throwable or 'null'.
    • log

      void log(int level, CharSequence message, Throwable cause, Supplier<?>... paramSuppliers)
      Logs a message with the specific Marker at the given level.
      Parameters:
      level - the logging level.
      message - the message string to be logged.
      cause - a Throwable or 'null'.
      paramSuppliers - the parameter Supplier or 'null' to be logged.
    • log

      void log(int level, CharSequence message, Throwable cause, Object... params)
      Logs a message with the specific Marker at the given level.
      Parameters:
      level - the logging level.
      message - the message string to be logged.
      cause - a Throwable or 'null'.
      params - the parameter objects or 'null' to be logged.
    • isTraceEnable

      boolean isTraceEnable()
      Checks whether this Logger is enabled for the TRACE level.
      Returns:
      true if this Logger is enabled for level TRACE, false otherwise.
    • trace

      void trace(CharSequence message)
      Logs a message with the TRACE level.
      Parameters:
      message - the message object to log.
    • trace

      void trace(CharSequence message, Throwable cause)
      Logs a message at the TRACE level including the stack trace of the Throwable.
      Parameters:
      message - the message object to log.
      cause - the Throwable to log, including its stack trace.
    • trace

      void trace(CharSequence message, Throwable cause, Supplier<?>... paramsSupplier)
      Logs a message at the TRACE level with parameters, including the stack trace of the Throwable.
      Parameters:
      message - the message object to log.
      cause - the Throwable to log, including its stack trace.
      paramsSupplier - the parameters to log.
    • atTrace

      LoggingBuilder atTrace()
      Level TRACE
      Returns:
      a new LoggingBuilder instance as appropriate for this log.
    • isDebugEnable

      boolean isDebugEnable()
      Checks whether this Logger is enabled for the DEBUG level.
      Returns:
      true if this Logger is enabled for level DEBUG, false otherwise.
    • debug

      void debug(CharSequence message)
      Logs a message with the DEBUG level.
      Parameters:
      message - the message object to log.
    • debug

      void debug(CharSequence message, Throwable cause)
      Logs a message at the DEBUG level including the stack trace of the Throwable.
      Parameters:
      message - the message object to log.
      cause - the Throwable to log, including its stack trace.
    • debug

      void debug(CharSequence message, Throwable cause, Supplier<?>... paramsSupplier)
      Logs a message at the DEBUG level with parameters, including the stack trace of the Throwable.
      Parameters:
      message - the message object to log.
      cause - the Throwable to log, including its stack trace.
      paramsSupplier - the parameters to log.
    • atDebug

      LoggingBuilder atDebug()
      Level DEBUG
      Returns:
      a new LoggingBuilder instance as appropriate for this log.
    • isInfoEnable

      boolean isInfoEnable()
      Checks whether this Logger is enabled for the INFO level.
      Returns:
      true if this Logger is enabled for level INFO, false otherwise.
    • info

      void info(CharSequence message)
      Logs a message with the INFO level.
      Parameters:
      message - the message object to log.
    • info

      void info(CharSequence message, Throwable cause)
      Logs a message at the INFO level including the stack trace of the Throwable. throwable passed as parameter.
      Parameters:
      message - the message object to log.
      cause - the Throwable to log, including its stack trace.
    • info

      void info(CharSequence message, Throwable cause, Supplier<?>... paramsSupplier)
      Logs a message at the INFO level with parameters, including the stack trace of the Throwable.
      Parameters:
      message - the message object to log.
      cause - the Throwable to log, including its stack trace.
      paramsSupplier - the parameters to log.
    • atInfo

      LoggingBuilder atInfo()
      Level INFO
      Returns:
      a new LoggingBuilder instance as appropriate for this log.
    • isWarnEnable

      boolean isWarnEnable()
      Checks whether this Logger is enabled for the WARN level.
      Returns:
      true if this Logger is enabled for level WARN, false otherwise.
    • warn

      void warn(CharSequence message)
      Logs a message with the WARN level.
      Parameters:
      message - the message object to log.
    • warn

      void warn(CharSequence message, Throwable cause)
      Logs a message at the WARN level including the stack trace of the Throwable. throwable passed as parameter.
      Parameters:
      message - the message object to log.
      cause - the Throwable to log, including its stack trace.
    • warn

      void warn(CharSequence message, Throwable cause, Supplier<?>... paramsSupplier)
      Logs a message at the WARN level with parameters, including the stack trace of the Throwable.
      Parameters:
      message - the message object to log.
      cause - the Throwable to log, including its stack trace.
      paramsSupplier - the parameters to log.
    • atWarn

      LoggingBuilder atWarn()
      Level WARN
      Returns:
      a new LoggingBuilder instance as appropriate for this log.
    • isErrorEnable

      boolean isErrorEnable()
      Checks whether this Logger is enabled for the ERROR level.
      Returns:
      true if this Logger is enabled for level ERROR, false otherwise.
    • error

      void error(CharSequence message)
      Logs a message with the ERROR level.
      Parameters:
      message - the message object to log.
    • error

      void error(CharSequence message, Throwable cause)
      Logs a message at the ERROR level including the stack trace of the Throwable. throwable passed as parameter.
      Parameters:
      message - the message object to log.
      cause - the Throwable to log, including its stack trace.
    • error

      void error(CharSequence message, Throwable cause, Supplier<?>... paramsSupplier)
      Logs a message at the ERROR level with parameters, including the stack trace of the Throwable.
      Parameters:
      message - the message object to log.
      cause - the Throwable to log, including its stack trace.
      paramsSupplier - the parameters to log.
    • atError

      LoggingBuilder atError()
      Level ERROR
      Returns:
      a new LoggingBuilder instance as appropriate for this log.
    • isFatalEnable

      boolean isFatalEnable()
      Checks whether this Logger is enabled for the FATAL level.
      Returns:
      true if this Logger is enabled for level FATAL, false otherwise.
    • fatal

      void fatal(CharSequence message)
      Logs a message with the FATAL level.
      Parameters:
      message - the message object to log.
    • fatal

      void fatal(CharSequence message, Throwable cause)
      Logs a message at the FATAL level including the stack trace of the Throwable. throwable passed as parameter.
      Parameters:
      message - the message object to log.
      cause - the Throwable to log, including its stack trace.
    • fatal

      void fatal(CharSequence message, Throwable cause, Supplier<?>... paramsSupplier)
      Logs a message at the FATAL level with parameters, including the stack trace of the Throwable.
      Parameters:
      message - the message object to log.
      cause - the Throwable to log, including its stack trace.
      paramsSupplier - the parameters to log.
    • atFatal

      LoggingBuilder atFatal()
      Level FATAL
      Returns:
      a new LoggingBuilder instance as appropriate for this log.