/** * Replace the active log transports. Pass `console: true, file: false` for * long-running services (the auth broker, etc.) that want their structured * logs piped into a process supervisor instead of the rotating file. */ export declare function setTransports(opts: { console?: boolean; file?: boolean | string; }): void; /** * Log an error message. * @param message - The message to log. * @param context - The context to log. */ export declare function error(message: string, context?: Record): void; /** * Log a warning message. * @param message - The message to log. * @param context - The context to log. */ export declare function warn(message: string, context?: Record): void; /** * Log an informational message. * @param message - The message to log. * @param context - The context to log. */ export declare function info(message: string, context?: Record): void; /** * Log a debug message. * @param message - The message to log. * @param context - The context to log. */ export declare function debug(message: string, context?: Record): void; /** * Print collected timings as an indented tree. * Each span shows wall duration; parents with children also show "(self)" for unattributed time. * Sibling spans are sorted by start time. Spans whose intervals overlap with siblings ran in parallel. */ export declare function printTimings(): void; /** * Begin recording startup timings under a new root span. * Idempotent: a second call while already recording is a no-op so that the * early starter (cli.ts, the first CLI statement) and the explicit starter * (main.ts) can coexist. * * The root is anchored at the process-start origin rather than at the call: * `performance.now()` counts milliseconds since `performance.timeOrigin` * (process start) on Bun, so `start: 0` makes `Total` the true * time-since-process-start. Runtime bootstrap plus static module linking and * evaluation then land in the root's self time instead of being invisible * before the first statement of cli.ts. */ export declare function startTiming(): void; /** * End timing window and clear buffers. */ export declare function endTiming(): void; /** * Time a span. Three forms: * time(op) — point event (zero-duration breadcrumb) * time(op, fn, ...args) — wrap fn in a span; returns fn's return value (sync or Promise) * * Spans nest hierarchically via AsyncLocalStorage: a child started inside another span's fn * (even across awaits) becomes that span's child. Parallel children are recorded as siblings * with overlapping intervals. */ export declare function time(op: string): void; export declare function time(op: string, fn: (...args: A) => T, ...args: A): T;