Class: SimpleLogger

SimpleLogger

Logger implementation returned by the SimpleLoggerProvider.

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

Method Summary

debug
Receives log messages at DEBUG level.
error
Receives log messages at ERROR level.
fatal
Receives log messages at FATAL level.
info
Receives log messages at INFO level.
isDebugEnabled
Checks if this Logger is enabled for the DEBUG level.
isErrorEnabled
Checks if this Logger is enabled for the ERROR level.
isFatalEnabled
Checks if this Logger is enabled for the FATAL level.
isInfoEnabled
Checks if this Logger is enabled for the INFO level.
isWarnEnabled
Checks if this Logger is enabled for the WARN level.
setLevel
Call by SimpleLoggerProvider to configure the minimum log level enabled.
warn
Receives log messages at WARN level.

Method Detail

debug(message, exception)

Receives log messages at DEBUG level.
Parameters:
Name Type Argument Description
message String The message to be logged.
exception Exception <optional>
An Exception instance related to the current log message.

error(message, exception)

Receives log messages at ERROR level.
Parameters:
Name Type Argument Description
message String The message to be logged.
exception Exception <optional>
An Exception instance related to the current log message.

fatal(message, exception)

Receives log messages at FATAL level.
Parameters:
Name Type Argument Description
message String The message to be logged.
exception Exception <optional>
An Exception instance related to the current log message.
See:

info(message, exception)

Receives log messages at INFO level.
Parameters:
Name Type Argument Description
message String The message to be logged.
exception Exception <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 SimpleLogger#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 SimpleLogger#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 SimpleLogger#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 SimpleLogger#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 SimpleLogger#warn method and should be ignored by the Logger implementation.
Returns:
true if WARN logging is enabled, false otherwise
Type
boolean

setLevel(level)

Call by SimpleLoggerProvider to configure the minimum log level enabled.
Parameters:
Name Type Argument Description
level String <optional>
log level enabled, if missing or if a not expected value is used "DEBUG" is assumed

warn(message, exception)

Receives log messages at WARN level.
Parameters:
Name Type Argument Description
message String The message to be logged.
exception Exception <optional>
An Exception instance related to the current log message.