Class: Logger

@proceed/machine.Logging.Logger(confObject, loggingInitializedPromise)

Class for logger instances Instantiates a new logger

Constructor

new Logger(confObject, loggingInitializedPromise)

Parameters:
Name Type Description
confObject object

The configuration for the logger

loggingInitializedPromise promise

a promise indicating that the logger has finished being asynchronously initialized

Source:

Methods

(async) _init(The)

Adds writer functions to the logger

Parameters:
Name Type Description
The object

configuration for the logger

Source:

(async) debug(msg)

The logger's debug method

Parameters:
Name Type Description
msg string | object

the message to be logged

Source:

(async) error(msg)

The logger's error method

Parameters:
Name Type Description
msg string | object

the message to be logged

Source:

(async) fatal(msg)

The logger's fatal method

Parameters:
Name Type Description
msg string | object

the message to be logged

Source:

handleLog(log, level) → {object}

Turns a string log message into an object, and adds additional information. If the log is already an object, some additional information is added

Parameters:
Name Type Description
log string | object

the log that will be prepared for saving or printing

level string

The log level function from which this function has been called

Source:
Returns:

a standardized logging object containinf at least the time of logging, a message and the level

Type
object

(async) info(msg)

The logger's info method

Parameters:
Name Type Description
msg string | object

the message to be logged

Source:

(async) log(obj)

The logger's general logging method. Calls one of the logging methods

Parameters:
Name Type Description
obj object

An object containing at least a level and a message.

Source:

(async) trace(msg)

The logger's trace method

Parameters:
Name Type Description
msg string | object

the message to be logged

Source:

(async) warn(msg)

The logger's warn method

Parameters:
Name Type Description
msg string | object

the message to be logged

Source: