Node.js Client 8.0.5

SimpleLogger

SimpleLogger

Logger implementation returned by the SimpleLoggerProvider.

Constructor

new SimpleLogger(provider, category)

Constructor for SimpleLogger.

Parameters:
Name Type Description
provider

A SimpleLoggerProvider object instance used to dispatch the log messages produced by this Logger instance.

category

A category name for the Logger instance.

Extends

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.

Overrides:

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.

Overrides:

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.

Overrides:
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.

Overrides:

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 SimpleLogger#debug method and should be ignored by the Logger implementation.

Overrides:
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 SimpleLogger#error method and should be ignored by the Logger implementation.

Overrides:
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 SimpleLogger#fatal method and should be ignored by the Logger implementation.

Overrides:
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 SimpleLogger#info method and should be ignored by the Logger implementation.

Overrides:
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 SimpleLogger#warn method and should be ignored by the Logger implementation.

Overrides:
Returns:

true if WARN logging is enabled, false otherwise

Type
boolean

setLevel(levelopt)

Call by SimpleLoggerProvider to configure the minimum log level enabled.

Parameters:
Name Type Attributes Description
level String <optional>

log level enabled, if missing or if a not expected value is used "DEBUG" is assumed

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.

Overrides: