import { Metric } from "../../Metrics/Metric.cjs"; import { Plugin } from "../../Plugin/Plugin.cjs"; import { PluginEvent } from "../../Plugin/types.cjs"; //#region src/Plugins/Logger/LoggerPlugin.d.ts /** * Logger Plugin * * This plugin is designed to make debugging any `Metric` as simple * as possible. When registering this Plugin on one or more of your * metrics, you'll receive a log to the console each time an event is * emitted from one of your metrics * * ```typescript * const metric = new Metric("My Metric", { * logger: new LoggerPlugin() * }); * ``` */ declare class LoggerPlugin = Metric> extends Plugin { private readonly events; constructor(events?: PluginEvent[]); /** * Start * * Logs the target Metric's `start` event */ protected start(metric: T): void; /** * Stop * * Logs the target Metric's `stop` event */ protected stop(metric: T): void; /** * Success * * Logs the target Metric's `success` event */ protected success(metric: T): void; /** * Failure * * Logs the target Metric's `failure` event */ protected failure(metric: T): void; /** * Reset * * Logs the target Metric's `reset` event */ protected reset(metric: T): void; /** * Log * * Returns a logging callback that'll verify that the incoming * event is white-listed by the constructor, then log the metric */ private log; /** * Capitalize * * Returns a capitalized plugin event */ private capitalize; } //#endregion export { LoggerPlugin };