Terminal

Terminal

Default console logger

Constructor

new Terminal(optionsopt)

Source:

Creates a new Terminal instance

Parameters:
Name Type Attributes Description
options Object <optional>

Terminal options

Properties
Name Type Attributes Default Description
loggerPrefix String <optional>

Option for a prefix before logging

suppressWarnings Boolean <optional>
false

Option to suppress warnings

timestamps Boolean <optional>
true

Option to show timestamps

Members

timestamp

Source:

Get current formatted timestamp

Methods

debug(…args)

Source:

Logs to console at debug level

Parameters:
Name Type Attributes Description
args String <repeatable>

Strings to log to console

error(…args)

Source:

Logs to console at error level

Parameters:
Name Type Attributes Description
args String | Error <repeatable>

Strings or errors to log to console

info(…args)

Source:

Logs to console at info level

Parameters:
Name Type Attributes Description
args String <repeatable>

Strings to log to console

log(…args)

Source:

Logs to console

Parameters:
Name Type Attributes Description
args String <repeatable>

Strings to log to console

supportsColours() → {Boolean}

Source:

Checks if the console supports colours

Returns:
Type
Boolean

warn(…args)

Source:

Logs to console at warn level

Parameters:
Name Type Attributes Description
args String <repeatable>

Strings to log to console