Class: Logger

util.Logger()

A Logger to store log notes when running the app.

Constructor

new Logger()

Source:

Members

entityManager :EntityManager

Type:
Source:

level :string

The log level which will be logged

The log level can be one of 'trace', 'debug', 'info', 'warn', 'error'

Type:
  • string
Source:

level

Sets the log level which will be logged

Source:

Methods

(static) create(entityManager) → {util.Logger}

Creates a Logger instance for the given EntityManager

Parameters:
Name Type Description
entityManager EntityManager
Source:
Returns:

The created logger instance

Type
util.Logger

debug(message, dataopt) → {Promise.<*>|null}

Log message at debug level

Parameters:
Name Type Attributes Default Description
message string

The message to log, the message string can be interpolated like the node util.format method

data Object.<string, *> <optional>
null

An optional object which will be included in the log entry

Source:
See:
Returns:

A promise which resolves when the log messages was logged, or null if the log level has
skipped the message

Type
Promise.<*> | null

debug(message, …args) → {Promise.<*>|null}

Log message at debug level

Parameters:
Name Type Attributes Description
message string

The message to log, the message string can be interpolated like the node util.format method

args * <repeatable>

The arguments used to interpolated the message string. The last param can be object which will
be included in the log entry

Source:
See:
Returns:

A promise which resolves when the log messages was logged, or null if the log level has
skipped the message

Type
Promise.<*> | null

error(message, …args) → {Promise.<*>|null}

Log message at error level

Parameters:
Name Type Attributes Description
message string

The message to log, the message string can be interpolated like the node util.format method

args * <repeatable>

The arguments used to interpolated the message string. The last param can be object which will
be included in the log entry

Source:
See:
Returns:

A promise which resolves when the log messages was logged, or null if the log level has
skipped the message

Type
Promise.<*> | null

error(message, dataopt) → {Promise.<*>|null}

Log message at error level

Parameters:
Name Type Attributes Default Description
message string

The message to log, the message string can be interpolated like the node util.format method

data Object.<string, *> <optional>
null

An optional object which will be included in the log entry

Source:
See:
Returns:

A promise which resolves when the log messages was logged, or null if the log level has
skipped the message

Type
Promise.<*> | null

info(message, dataopt) → {Promise.<*>|null}

Log message at info level

Parameters:
Name Type Attributes Default Description
message string

The message to log, the message string can be interpolated like the node util.format method

data Object.<string, *> <optional>
null

An optional object which will be included in the log entry

Source:
See:
Returns:

A promise which resolves when the log messages was logged, or null if the log level has
skipped the message

Type
Promise.<*> | null

info(message, …args) → {Promise.<*>|null}

Log message at info level

Parameters:
Name Type Attributes Description
message string

The message to log, the message string can be interpolated like the node util.format method

args * <repeatable>

The arguments used to interpolated the message string. The last param can be object which will
be included in the log entry

Source:
See:
Returns:

A promise which resolves when the log messages was logged, or null if the log level has
skipped the message

Type
Promise.<*> | null

log(message, …args) → {void}

Logs a message in the default level 'info'

Parameters:
Name Type Attributes Description
message string

The message to log, the message string can be interpolated like the node util.format method

args * <repeatable>

The arguments used to interpolated the message string. The last param can be object which will
be included in the log entry

Source:
See:
Returns:
Type
void

log(message, dataopt) → {void}

Logs a message in the default level 'info'

Parameters:
Name Type Attributes Default Description
message string

The message to log, the message string can be interpolated like the node util.format method

data Object.<string, *> <optional>
null

An optional object which will be included in the log entry

Source:
See:
Returns:
Type
void

log(level, message, …args) → {void}

Logs a message with the given log level

Parameters:
Name Type Attributes Description
level string

The level used to log the message

message string

The message to log, the message string can be interpolated like the node util.format method

args * <repeatable>

The arguments used to interpolated the message string. The last param can be object which will
be included in the log entry

Source:
See:
Returns:
Type
void

log(level, message, dataopt) → {Promise.<*>|null}

Logs a message with the given log level

Parameters:
Name Type Attributes Default Description
level string

The level used to log the message

message string

The message to log, the message string can be interpolated like the node util.format method

data Object.<string, *> <optional>
null

An optional object which will be included in the log entry

Source:
See:
Returns:

A promise which resolves when the log messages was logged, or null if the log level has
skipped the message

Type
Promise.<*> | null

trace(message, …args) → {Promise.<*>|null}

Log message at trace level

Parameters:
Name Type Attributes Description
message string

The message to log, the message string can be interpolated like the node util.format method

args * <repeatable>

The arguments used to interpolated the message string. The last param can be object which will
be included in the log entry

Source:
See:
Returns:

A promise which resolves when the log messages was logged, or null if the log level has
skipped the message

Type
Promise.<*> | null

trace(message, dataopt) → {Promise.<*>|null}

Log message at trace level

Parameters:
Name Type Attributes Default Description
message string

The message to log, the message string can be interpolated like the node util.format method

data Object.<string, *> <optional>
null

An optional object which will be included in the log entry

Source:
See:
Returns:

A promise which resolves when the log messages was logged, or null if the log level has
skipped the message

Type
Promise.<*> | null

warn(message, …args) → {Promise.<*>|null}

Log message at warn level

Parameters:
Name Type Attributes Description
message string

The message to log, the message string can be interpolated like the node util.format method

args * <repeatable>

The arguments used to interpolated the message string. The last param can be object which will
be included in the log entry

Source:
See:
Returns:

A promise which resolves when the log messages was logged, or null if the log level has
skipped the message

Type
Promise.<*> | null

warn(message, dataopt) → {Promise.<*>|null}

Log message at warn level

Parameters:
Name Type Attributes Default Description
message string

The message to log, the message string can be interpolated like the node util.format method

data Object.<string, *> <optional>
null

An optional object which will be included in the log entry

Source:
See:
Returns:

A promise which resolves when the log messages was logged, or null if the log level has
skipped the message

Type
Promise.<*> | null