/** * @module * This module provides functions for creating events. */ import { Level } from "./level.js"; /** * The Event type represents the information which is passed to subscribers when an event is created. */ export type Event = { isEvent: true; level: Level; message: string; fields?: Record; }; /** * Creates a new event and passes it to the current subscriber. * * @param level The level of the event * @param message The message of the event * @param fields The fields of the event (optional additional information) */ export declare function event(level: Level, message: string, fields?: Record): void; /** * Creates a new trace level event and passes it to the current subscriber. * * @param message The message of the event * @param fields The fields of the event (optional additional information) */ export declare function trace(message: string, fields?: Record): void; /** * Creates a new debug level event and passes it to the current subscriber. * * @param message The message of the event * @param fields The fields of the event (optional additional information) */ export declare function debug(message: string, fields?: Record): void; /** * Creates a new info level event and passes it to the current subscriber. * * @param message The message of the event * @param fields The fields of the event (optional additional information) */ export declare function info(message: string, fields?: Record): void; /** * Creates a new warn level event and passes it to the current subscriber. * * @param message The message of the event * @param fields The fields of the event (optional additional information) */ export declare function warn(message: string, fields?: Record): void; /** * Creates a new error level event and passes it to the current subscriber. * * @param message The message of the event * @param fields The fields of the event (optional additional information) */ export declare function error(message: string, fields?: Record): void; /** * Creates a new critical level event and passes it to the current subscriber. * * @param message The message of the event * @param fields The fields of the event (optional additional information) */ export declare function critical(message: string, fields?: Record): void; /** * The Log object provides functions for creating events. It is a convenience object which provides the same functions * as the module itself. */ export declare const Log: { trace: typeof trace; debug: typeof debug; info: typeof info; warn: typeof warn; error: typeof error; critical: typeof critical; }; //# sourceMappingURL=event.d.ts.map