Skip to main content

@enreachde/swyx-web-extension-sdk - v1.0.1 / Exports / ILogger

Interface: ILogger

Logger contract used by connection and SDK components.

Implemented by​

Table of contents​

Methods​

Methods​

debug​

▸ debug(module, method, message?): void

Writes a debug log message.

Parameters​

NameTypeDescription
modulestringThe name of the module that is writing the log message.
methodstringThe name of the method that is writing the log message.
message?stringThe log message to write. Optional. If not provided, the logger implementation may choose to log the module and method information only.

Returns​

void


error​

▸ error(module, method, message?): void

Writes an error log message.

Parameters​

NameTypeDescription
modulestringThe name of the module that is writing the log message.
methodstringThe name of the method that is writing the log message.
message?stringThe log message to write. Optional. If not provided, the logger implementation may choose to log the module and method information only.

Returns​

void


getLogLevel​

▸ getLogLevel(): LogLevel

Returns the currently active log level.

Returns​

LogLevel


info​

▸ info(module, method, message?): void

Writes an informational log message.

Parameters​

NameTypeDescription
modulestringThe name of the module that is writing the log message.
methodstringThe name of the method that is writing the log message.
message?stringThe log message to write. Optional. If not provided, the logger implementation may choose to log the module and method information only.

Returns​

void


log​

▸ log(logLevel, module, method, message?): void

Writes a log message at the provided level.

Parameters​

NameTypeDescription
logLevelLogLevelThe log level to write the message at.
modulestringThe name of the module that is writing the log message.
methodstringThe name of the method that is writing the log message.
message?stringThe log message to write. Optional. If not provided, the logger implementation may choose to log the module and method information only.

Returns​

void


notice​

▸ notice(module, method, message?): void

Writes a notice log message.

Parameters​

NameTypeDescription
modulestringThe name of the module that is writing the log message.
methodstringThe name of the method that is writing the log message.
message?stringThe log message to write. Optional. If not provided, the logger implementation may choose to log the module and method information only.

Returns​

void


setLogLevel​

▸ setLogLevel(logLevel): void

Updates the currently active log level.

Parameters​

NameType
logLevelLogLevel

Returns​

void


verbose​

▸ verbose(module, method, message?): void

Writes a verbose log message.

Parameters​

NameTypeDescription
modulestringThe name of the module that is writing the log message.
methodstringThe name of the method that is writing the log message.
message?stringThe log message to write. Optional. If not provided, the logger implementation may choose to log the module and method information only.

Returns​

void


warn​

▸ warn(module, method, message?): void

Writes a warning log message.

Parameters​

NameTypeDescription
modulestringThe name of the module that is writing the log message.
methodstringThe name of the method that is writing the log message.
message?stringThe log message to write. Optional. If not provided, the logger implementation may choose to log the module and method information only.

Returns​

void