Logging
Persisted logging, logs messages can be saved both to commands and events
Functions
info
Function  (...args: unknown[]) => void
Log a message at the “INFO” logging level
| Argument | Type | Example | Description | 
|---|---|---|---|
| args | unknown | ”Example message”, true, | Any type of data, will be stored in the log | 
const message = "This message will appear in the log";const messageObject = {  key: "some value",};
api.logging.info(message, messageObject);
// ..or
console.log(message, messageObject);
// ..or
console.info(message, messageObject);
// Will appear in the log as:// some value, { "key": "some value" }error
Function  (...args: unknown[]) => void
Log a message at the “ERROR” logging level
| Argument | Type | Example | Description | 
|---|---|---|---|
| args | unknown | ”Example message”, true, | Any type of data, will be stored in the log | 
const message = "This message will appear in the log";const messageObject = {  key: "some value",};
api.logging.error(message, messageObject);
// ..or
console.error(message, messageObject);
// Will appear in the log as:// some value, { "key": "some value" }warn
Function  (...args: unknown[]) => void
Log a message at the “WARN” logging level
| Argument | Type | Example | Description | 
|---|---|---|---|
| args | unknown | ”Example message”, true, | Any type of data, will be stored in the log | 
const message = "This message will appear in the log";const messageObject = {  key: "some value",};
api.logging.warn(message, messageObject);
// ..or
console.warn(message, messageObject);
// Will appear in the log as:// some value, { "key": "some value" }debug
Function  (...args: unknown[]) => void
Log a message at the “DEBUG” logging level
| Argument | Type | Example | Description | 
|---|---|---|---|
| args | unknown | ”Example message”, true, | Any type of data, will be stored in the log | 
const message = "This message will appear in the log";const messageObject = {  key: "some value",};
api.logging.debug(message, messageObject);
// ..or
console.debug(message, messageObject);
// Will appear in the log as:// some value, { "key": "some value" }