Logger()

Class with a logger interface. Messages are only logged to console if their log level is smaller or equal than the current log level.

new Logger()

Author:

Methods

static error(…args)

Logs a message with the level ERROR.

Parameters:
Name Type Attributes Description
args Any <repeatable>

The arguments to log.

static log(…args)

Logs a message with the level LOG.

Parameters:
Name Type Attributes Description
args Any <repeatable>

The arguments to log.

static setLevel(level)

Sets the log level for the logger. Allow values are: LOG, WARN, ERROR, SILENT. The default level is WARN. The constants are accessible over the Logger.LEVEL namespace.

Parameters:
Name Type Description
level Number

The log level.

static warn(…args)

Logs a message with the level WARN.

Parameters:
Name Type Attributes Description
args Any <repeatable>

The arguments to log.