Class: Logger

hcje/errors.Logger(maxSizeopt)

Logger class. This is used for logging messages that may need to be displayed later. It will also redirect to the console. The console methods are not hijacked so that the log does not become polluted with multiple messages that may not need to be logged.

Constructor

new Logger(maxSizeopt)

Construct the logger.

Parameters:
Name Type Attributes Default Description
maxSize number <optional>
100

Maximum number of messages retained.

Source:

Members

(readonly) markdown :string

Markdown list representation of the log.

Type:
  • string
Source:

Methods

clear()

Clear the log.

Source:

debug(message)

Debug log message. The message is still sent to the console.

Parameters:
Name Type Description
message string

Text to add to the log.

Source:

error(message)

Error log message. The message is still sent to the console.

Parameters:
Name Type Description
message string

Text to add to the log.

Source:

info(message)

Info log message. The message is still sent to the console.

Parameters:
Name Type Description
message string

Text to add to the log.

Source:

log(message)

Normal log message. The message is still sent to the console.

Parameters:
Name Type Description
message string

Text to add to the log.

Source:

warn(message)

Warning log message. The message is still sent to the console.

Parameters:
Name Type Description
message string

Text to add to the log.

Source: