export type LogLevel = 'debug' | 'info' | 'warn' | 'error' | 'fatal'; export type LogContext = Record; export type ErrorInfo = { name: string; message: string; stack?: string; cause?: ErrorInfo; }; export type TraceContext = { traceId: string; spanId: string; traceFlags?: number; }; export type LogRecord = { level: LogLevel; message: string; timestamp: string; context: LogContext; error?: ErrorInfo; trace?: TraceContext; }; export type Formatter = { format: (record: LogRecord) => Record; messageKey: string; }; export type LabelStyle = 'icon' | 'none' | 'text'; export declare const defaultLabelStyle: LabelStyle; export type TimeStyle = 'datetime' | 'iso' | 'time'; /** * Resolve the plain-text timestamp style. * Precedence: LOG_TIME > stdout TTY detection. * Interactive terminals get time only — the date is invariant across a session * and the line stays narrow. Piped or redirected output gets the full date, * since captured lines are read back long after they were written. * Unrecognized `LOG_TIME` values fall through to TTY detection. */ export declare function detectTimeStyle(): TimeStyle; export declare const defaultTimeStyle: TimeStyle; export type LoggerOptions = { colors?: boolean; formatter?: Formatter; json?: boolean; labels?: LabelStyle; level?: LogLevel; time?: TimeStyle; traceContext?: () => TraceContext | undefined; }; export type FormatterName = 'datadog' | 'ecs' | 'google-cloud-logging' | 'pino' | 'victoria-logs'; export declare const defaultFormat: FormatterName | undefined; export declare const isJsonMode: boolean; /** * Resolve whether colored plain-text output should be used. * Precedence: FORCE_COLOR > NO_COLOR > stdout TTY detection. * `FORCE_COLOR=0`/`false` disables; any other value (incl. empty) enables. * `NO_COLOR` (https://no-color.org) disables when present, regardless of value. */ export declare function detectColors(): boolean; export declare const defaultColors: boolean; export type InterceptOptions = { formatter?: Formatter; filter?: (level: LogLevel, message: string) => boolean; level?: LogLevel; traceContext?: () => TraceContext | undefined; }; export declare const logLevelValues: Record; export declare function stripAnsi(str: string): string; export declare function flattenError(entry: Record, error: ErrorInfo, prefix?: string): void; export declare function write(data: string, isError: boolean): void;