"use strict";
/* eslint-disable @typescript-eslint/no-explicit-any */
Object.defineProperty(exports, "__esModule", { value: true });
exports.logger = exports.Logger = void 0;
/**
* Provides logging services for a script.
*
* Access the logger through the global `logger` object.
*
* NOTE: In a local test environment, the logger writes to the normal JavaScript
* console. In the real Brigade runtime environment, a levelled logger is
* used which responds appropriately to the configured level.
*/
class Logger {
/**
* Logs a message at Debug level.
* @param message The message to log
* @param meta Values to replace any substitution strings in `message`
*/
debug(message, ...meta) {
console.debug(message, ...meta);
return this;
}
/**
* Logs a message at Information level.
* @param message The message to log
* @param meta Values to replace any substitution strings in `message`
*/
info(message, ...meta) {
console.info(message, ...meta);
return this;
}
/**
* Logs a message at Warning level.
* @param message The message to log
* @param meta Values to replace any substitution strings in `message`
*/
warn(message, ...meta) {
console.warn(message, ...meta);
return this;
}
/**
* Logs a message at Error level.
* @param message The message to log
* @param meta Values to replace any substitution strings in `message`
*/
error(message, ...meta) {
console.error(message, ...meta);
return this;
}
}
exports.Logger = Logger;
/** Provides logging for a script. */
exports.logger = new Logger();
//# sourceMappingURL=logger.js.map