@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
| Name | Type | Description |
|---|---|---|
module | string | The name of the module that is writing the log message. |
method | string | The name of the method that is writing the log message. |
message? | string | The 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
| Name | Type | Description |
|---|---|---|
module | string | The name of the module that is writing the log message. |
method | string | The name of the method that is writing the log message. |
message? | string | The 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
info
▸ info(module, method, message?): void
Writes an informational log message.
Parameters
| Name | Type | Description |
|---|---|---|
module | string | The name of the module that is writing the log message. |
method | string | The name of the method that is writing the log message. |
message? | string | The 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
| Name | Type | Description |
|---|---|---|
logLevel | LogLevel | The log level to write the message at. |
module | string | The name of the module that is writing the log message. |
method | string | The name of the method that is writing the log message. |
message? | string | The 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
| Name | Type | Description |
|---|---|---|
module | string | The name of the module that is writing the log message. |
method | string | The name of the method that is writing the log message. |
message? | string | The 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
| Name | Type |
|---|---|
logLevel | LogLevel |
Returns
void
verbose
▸ verbose(module, method, message?): void
Writes a verbose log message.
Parameters
| Name | Type | Description |
|---|---|---|
module | string | The name of the module that is writing the log message. |
method | string | The name of the method that is writing the log message. |
message? | string | The 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
| Name | Type | Description |
|---|---|---|
module | string | The name of the module that is writing the log message. |
method | string | The name of the method that is writing the log message. |
message? | string | The log message to write. Optional. If not provided, the logger implementation may choose to log the module and method information only. |
Returns
void