caf_iot/plug_iot_log

A logger component.

Properties:

     {logLevel: string}

where the levels of logLevel are OFF, FATAL, ERROR, WARN, INFO, DEBUG and TRACE (in that order).

Source:

Extends

Methods

currentLevel() → {string}

Source:

Gets the current threshold for logging events.

Returns:

The current threshold for logging events.

Type
string

debug(msg)

Source:

Logs msg at DEBUG level.

Parameters:
Name Type Description
msg string

A message to be logged.

error(msg)

Source:

Logs msg at ERROR level.

Parameters:
Name Type Description
msg string

A message to be logged.

fatal(msg)

Source:

Logs msg at FATAL level.

Parameters:
Name Type Description
msg string

A message to be logged.

info(msg)

Source:

Logs msg at INFO level.

Parameters:
Name Type Description
msg string

A message to be logged.

isActive(candidateLevel) → {boolean}

Source:

Checks if a candidate level would log with current settings.

Parameters:
Name Type Description
candidateLevel string

A candidate level.

Returns:

True if that level is logged.

Type
boolean

setLevel(newLogLevel) → {string}

Source:

Sets the threshold for logging events.

Parameters:
Name Type Description
newLogLevel string

A new logging level.

Returns:

The previous logging level.

Type
string

trace(msg)

Source:

Logs msg at TRACE level.

Parameters:
Name Type Description
msg string

A message to be logged.

warn(msg)

Source:

Logs msg at WARN level.

Parameters:
Name Type Description
msg string

A message to be logged.