Interface ILogger

All Known Implementing Classes:
CachedLogger, CompositeLogger, ConsoleLogger, Logger, NullLogger

public interface ILogger
Interface for logger components that capture execution log messages.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    debug(String correlationId, String message, Object... args)
    Logs a high-level debug information for troubleshooting.
    void
    error(String correlationId, Exception error)
    Logs recoverable application error.
    void
    error(String correlationId, Exception error, String message, Object... args)
    Logs recoverable application error.
    void
    error(String correlationId, String message, Object... args)
    Logs recoverable application error.
    void
    fatal(String correlationId, Exception error)
    Logs fatal (unrecoverable) message that caused the process to crash.
    void
    fatal(String correlationId, Exception error, String message, Object... args)
    Logs fatal (unrecoverable) message that caused the process to crash.
    void
    fatal(String correlationId, String message, Object... args)
    Logs fatal (unrecoverable) message that caused the process to crash.
    Gets the maximum log level.
    void
    info(String correlationId, String message, Object... args)
    Logs an important information message
    void
    log(LogLevel level, String correlationId, Exception error, String message, Object... args)
    Logs a message at specified log level.
    void
    Set the maximum log level.
    void
    trace(String correlationId, String message, Object... args)
    Logs a low-level debug information for troubleshooting.
    void
    warn(String correlationId, String message, Object... args)
    Logs a warning that may or may not have a negative impact.
  • Method Details

    • getLevel

      LogLevel getLevel()
      Gets the maximum log level. Messages with higher log level are filtered out.
      Returns:
      the maximum log level.
    • setLevel

      void setLevel(LogLevel value)
      Set the maximum log level.
      Parameters:
      value - a new maximum log level.
    • log

      void log(LogLevel level, String correlationId, Exception error, String message, Object... args)
      Logs a message at specified log level.
      Parameters:
      level - a log level.
      correlationId - (optional) transaction id to trace execution through call chain.
      error - an error object associated with this message.
      message - a human-readable message to log.
      args - arguments to parameterize the message.
    • fatal

      void fatal(String correlationId, String message, Object... args)
      Logs fatal (unrecoverable) message that caused the process to crash.
      Parameters:
      correlationId - (optional) transaction id to trace execution through call chain.
      message - a human-readable message to log.
      args - arguments to parameterize the message.
    • fatal

      void fatal(String correlationId, Exception error)
      Logs fatal (unrecoverable) message that caused the process to crash.
      Parameters:
      correlationId - (optional) transaction id to trace execution through call chain.
      error - an error object associated with this message.
    • fatal

      void fatal(String correlationId, Exception error, String message, Object... args)
      Logs fatal (unrecoverable) message that caused the process to crash.
      Parameters:
      correlationId - (optional) transaction id to trace execution through call chain.
      error - an error object associated with this message.
      message - a human-readable message to log.
      args - arguments to parameterize the message.
    • error

      void error(String correlationId, String message, Object... args)
      Logs recoverable application error.
      Parameters:
      correlationId - (optional) transaction id to trace execution through call chain.
      message - a human-readable message to log.
      args - arguments to parameterize the message.
    • error

      void error(String correlationId, Exception error)
      Logs recoverable application error.
      Parameters:
      correlationId - (optional) transaction id to trace execution through call chain.
      error - an error object associated with this message.
    • error

      void error(String correlationId, Exception error, String message, Object... args)
      Logs recoverable application error.
      Parameters:
      correlationId - (optional) transaction id to trace execution through call chain.
      error - an error object associated with this message.
      message - a human-readable message to log.
      args - arguments to parameterize the message.
    • warn

      void warn(String correlationId, String message, Object... args)
      Logs a warning that may or may not have a negative impact.
      Parameters:
      correlationId - (optional) transaction id to trace execution through call chain.
      message - a human-readable message to log.
      args - arguments to parameterize the message.
    • info

      void info(String correlationId, String message, Object... args)
      Logs an important information message
      Parameters:
      correlationId - (optional) transaction id to trace execution through call chain.
      message - a human-readable message to log.
      args - arguments to parameterize the message.
    • debug

      void debug(String correlationId, String message, Object... args)
      Logs a high-level debug information for troubleshooting.
      Parameters:
      correlationId - (optional) transaction id to trace execution through call chain.
      message - a human-readable message to log.
      args - arguments to parameterize the message.
    • trace

      void trace(String correlationId, String message, Object... args)
      Logs a low-level debug information for troubleshooting.
      Parameters:
      correlationId - (optional) transaction id to trace execution through call chain.
      message - a human-readable message to log.
      args - arguments to parameterize the message.