import type { Event } from "../event.js"; import { Level } from "../level.js"; import type { SpanAttributes } from "../span.js"; import { ManagedSubscriber } from "./ManagedSubscriber.js"; /** * Options for the JsonSubscriber. */ export type JsonSubscriberOptions = { /** * The minimum level of logs to display. * * @default Level.INFO */ level?: Level; /** * Include a timestamp in the message. * * @default true */ timestamp?: boolean; }; /** * The JsonSubscriber class is a subscriber which logs events to the console in JSON format. * * @example * ```ts * import { JsonSubscriber } from "@bcheidemann/tracing"; * * // Initialize the subscriber and set it as the default global subscriber * // This should be called at the beginning of your program * JsonSubscriber.setGlobalDefault(); * ``` */ export declare class JsonSubscriber extends ManagedSubscriber { private readonly options; constructor(options?: JsonSubscriberOptions); /** * Initialises the JsonSubscriber as the default global subscriber. * * @deprecated Use `JsonSubscriber.setGlobalDefault()` instead */ static init(options?: JsonSubscriberOptions): JsonSubscriber; static setGlobalDefault(options?: JsonSubscriberOptions): JsonSubscriber; protected onEvent(event: Event, spans: SpanAttributes[]): void; private displayMessage; private displaySpan; private formatFields; private displayLevel; private get timestamp(); } //# sourceMappingURL=JsonSubscriber.d.ts.map