import { Writable } from "node:stream"; type LogLevel = "debug" | "info" | "warn" | "error"; type Primitive = string | number | boolean | null; type FieldValue = Primitive | Primitive[] | Record; export interface MetricEvent { name: string; value: number; type?: "counter" | "gauge" | "timing"; unit?: string; attributes?: Record; } export type MetricsSink = (event: MetricEvent) => void | Promise; export interface StructuredLoggerOptions { name?: string; stream?: Writable; base?: Record; metrics?: MetricsSink | MetricsSink[]; } export declare class StructuredLogger { private readonly stream; private readonly base; private readonly metricsSinks; constructor(options?: StructuredLoggerOptions); child(fields: Record): StructuredLogger; log(level: LogLevel, message: string, fields?: Record): void; debug(message: string, fields?: Record): void; info(message: string, fields?: Record): void; warn(message: string, fields?: Record): void; error(message: string, fields?: Record): void; startTimer(): () => number; recordMetric(event: MetricEvent): void; recordTiming(name: string, durationMs: number, attributes?: Record): void; time(message: string, fn: () => Promise | T, fields?: Record, metricName?: string): Promise; } export declare function createStructuredLogger(options?: StructuredLoggerOptions): StructuredLogger; export {};