Logger

Wrapper around console functions for logging messages, erros etc.

Source:

Requires

  • module:../data/MessageLevel
  • module:../data/GlobalConsts
  • module:../AddonSettings
  • module:Logger/RealConsole

Methods

(static) init() → {Promise}

Source:

Inits some information.

Returns:
Type
Promise

(static) log(messagetype, …args) → {void}

Source:

Logs a string to console.

Pass as many strings/output as you want. For brevity, better prefer the other functions (logError, etc.) instead of this one.

Parameters:
Name Type Attributes Description
messagetype MESSAGE_LEVEL
args * <repeatable>
Returns:
Type
void

(static) logError(…args) → {void}

Source:

Logs a fatal error.

Parameters:
Name Type Attributes Description
args * <repeatable>
Returns:
Type
void

(static) logInfo(…args) → {void}

Source:

Logs some information.

Note: This log may be skipped, when not in debug mode.

Parameters:
Name Type Attributes Description
args * <repeatable>
Returns:
Type
void

(static) logWarning(…args) → {void}

Source:

Logs a warning.

Parameters:
Name Type Attributes Description
args * <repeatable>
Returns:
Type
void

(static) setDebugMode(isDebug) → {void}

Source:

Enable or disable the debug mode.

Parameters:
Name Type Description
isDebug boolean
Returns:
Type
void