Web Client 8.1.0-beta5

Logger

Logger

Simple Interface to be implemented to produce log.

Constructor

new Logger()

This is a dummy constructor not to be used in any case.

Methods

debug(message, exceptionopt)

Receives log messages at DEBUG level.

Parameters:
Name Type Attributes Description
message String

The message to be logged.

exception Error <optional>

An Exception instance related to the current log message.

error(message, exceptionopt)

Receives log messages at ERROR level.

Parameters:
Name Type Attributes Description
message String

The message to be logged.

exception Error <optional>

An Exception instance related to the current log message.

fatal(message, exceptionopt)

Receives log messages at FATAL level.

Parameters:
Name Type Attributes Description
message String

The message to be logged.

exception Error <optional>

An Exception instance related to the current log message.

See:

info(message, exceptionopt)

Receives log messages at INFO level.

Parameters:
Name Type Attributes Description
message String

The message to be logged.

exception Error <optional>

An Exception instance related to the current log message.

isDebugEnabled() → {boolean}

Checks if this Logger is enabled for the DEBUG level. The method should return true if this Logger is enabled for DEBUG events, false otherwise.
This property is intended to let the library save computational cost by suppressing the generation of log DEBUG statements. However, even if the method returns false, DEBUG log lines may still be received by the Logger#debug method and should be ignored by the Logger implementation.

Returns:

true if DEBUG logging is enabled, false otherwise

Type
boolean

isErrorEnabled() → {boolean}

Checks if this Logger is enabled for the ERROR level. The method should return true if this Logger is enabled for ERROR events, false otherwise.
This property is intended to let the library save computational cost by suppressing the generation of log ERROR statements. However, even if the method returns false, ERROR log lines may still be received by the Logger#error method and should be ignored by the Logger implementation.

Returns:

true if ERROR logging is enabled, false otherwise

Type
boolean

isFatalEnabled() → {boolean}

Checks if this Logger is enabled for the FATAL level. The method should return true if this Logger is enabled for FATAL events, false otherwise.
This property is intended to let the library save computational cost by suppressing the generation of log FATAL statements. However, even if the method returns false, FATAL log lines may still be received by the Logger#fatal method and should be ignored by the Logger implementation.

Returns:

true if FATAL logging is enabled, false otherwise

Type
boolean

isInfoEnabled() → {boolean}

Checks if this Logger is enabled for the INFO level. The method should return true if this Logger is enabled for INFO events, false otherwise.
This property is intended to let the library save computational cost by suppressing the generation of log INFO statements. However, even if the method returns false, INFO log lines may still be received by the Logger#info method and should be ignored by the Logger implementation.

Returns:

true if INFO logging is enabled, false otherwise

Type
boolean

isWarnEnabled() → {boolean}

Checks if this Logger is enabled for the WARN level. The method should return true if this Logger is enabled for WARN events, false otherwise.
This property is intended to let the library save computational cost by suppressing the generation of log WARN statements. However, even if the method returns false, WARN log lines may still be received by the Logger#warn method and should be ignored by the Logger implementation.

Returns:

true if WARN logging is enabled, false otherwise

Type
boolean

warn(message, exceptionopt)

Receives log messages at WARN level.

Parameters:
Name Type Attributes Description
message String

The message to be logged.

exception Error <optional>

An Exception instance related to the current log message.