Defined in: aa-sdk/core/src/logger.ts:13
Logger class provides static methods for logging at different levels such as error, warn, debug, info, and verbose. This class allows setting log levels and log filters to control the logging behavior.
new Logger(): Logger;Returns
Logger
| Property | Type | Default value |
|---|---|---|
|
| |
|
static debug(msg, ...args): void;Defined in: aa-sdk/core/src/logger.ts:99
Logs a debug message to the console if the log level allows it.
Example
import { Logger } from "@aa-sdk/core";
Logger.debug("Something is happening");Parameters
| Parameter | Type | Description |
|---|---|---|
|
| The message to log |
... |
| Additional arguments to pass to the console.debug method |
Returns
void
static error(msg, ...args): void;Defined in: aa-sdk/core/src/logger.ts:61
Logs an error message to the console if the logging condition is met.
Example
import { Logger } from "@aa-sdk/core";
Logger.error("An error occurred while processing the request");Parameters
| Parameter | Type | Description |
|---|---|---|
|
| The primary error message to be logged |
... |
| Additional arguments to be logged along with the error message |
Returns
void
static info(msg, ...args): void;Defined in: aa-sdk/core/src/logger.ts:118
Logs an informational message to the console if the logging level is set to INFO.
Example
import { Logger } from "@aa-sdk/core";
Logger.info("Something is happening");Parameters
| Parameter | Type | Description |
|---|---|---|
|
| the message to log |
... |
| additional arguments to log alongside the message |
Returns
void
static setLogFilter(pattern): void;Defined in: aa-sdk/core/src/logger.ts:44
Sets the log filter pattern.
Example
import { Logger } from "@aa-sdk/core";
Logger.setLogFilter("error");Parameters
| Parameter | Type | Description |
|---|---|---|
|
| The pattern to set as the log filter |
Returns
void
static setLogLevel(logLevel): void;Defined in: aa-sdk/core/src/logger.ts:28
Sets the log level for logging purposes.
Example
import { Logger, LogLevel } from "@aa-sdk/core";
Logger.setLogLevel(LogLevel.DEBUG);Parameters
| Parameter | Type | Description |
|---|---|---|
| The desired log level |
Returns
void
static verbose(msg, ...args): void;Defined in: aa-sdk/core/src/logger.ts:137
Logs a message with additional arguments if the logging level permits it.
Example
import { Logger } from "@aa-sdk/core";
Logger.verbose("Something is happening");Parameters
| Parameter | Type | Description |
|---|---|---|
|
| The message to log |
... |
| Additional arguments to be logged |
Returns
void
static warn(msg, ...args): void;Defined in: aa-sdk/core/src/logger.ts:80
Logs a warning message if the logging conditions are met.
Example
import { Logger } from "@aa-sdk/core";
Logger.warn("Careful...");Parameters
| Parameter | Type | Description |
|---|---|---|
|
| The message to log as a warning |
... |
| Additional parameters to log along with the message |
Returns
void