ILogger

Interface for logger components that capture execution log messages.

Description

The ILogger interface provides a set of methods for logger components that capture log messages.

Instance methods

debug

Logs high-level debug information for troubleshooting.

void debug(IContext context, String message, Object… args)

  • context: IContext - (optional) a context to trace execution through call chain.
  • message: String - a human-readable message to log.
  • args: Object - arguments to parameterize the message.

error

Logs recoverable application error.

void error(IContext context, Exception error, String message, Object… args)

  • context: IContext - (optional) a context to trace execution through call chain.
  • error: Exception - an error object associated with this message.
  • message: String - a human-readable message to log.
  • args: Object - arguments to parameterize the message.

fatal

Logs fatal (unrecoverable) message that caused the process to crash.

void fatal(IContext context, Exception error, String message, Object… args)

  • context: IContext - (optional) a context to trace execution through call chain.
  • error: Exception - an error object associated with this message.
  • message: String - a human-readable message to log.
  • args: Object - arguments to parameterize the message.

getLevel

Gets the maximum log level. Messages with higher log level are filtered out.

LogLevel getLevel()

  • returns: LogLevel - the maximum log level.

log

Logs a message at a specified log level.

void log( LogLevel level, IContext context, Exception error, String message, Object… args)

  • level: LogLevel - a log level.
  • context: IContext - (optional) a context to trace execution through call chain.
  • error: Exceptionr - an error object associated with this message.
  • message: String - a human-readable message to log.
  • args: Object - arguments to parameterize the message.

info

Logs an important information message

void info(IContextt context, String message, Object… args)

  • context: IContext - (optional) a context to trace execution through call chain.
  • message: string - a human-readable message to log.
  • args: Object - arguments to parameterize the message.

setLevel

Set the maximum log level.

void setLevel(LogLevel value)

  • level: LogLevel - a new maximum log level.

trace

Logs low-level debug information for troubleshooting.

void trace(IContext context, String message, Object… args)

  • context: IContext - (optional) a context to trace execution through call chain.
  • message: String - a human-readable message to log.
  • args: Object - arguments to parameterize the message.

warn

Logs a warning that may or may not have a negative impact.

void warn(IContext context, String message, Object… args)

  • context: IContext - (optional) a context to trace execution through call chain.
  • message: String - a human-readable message to log.
  • args: Object - arguments to parameterize the message.