import { i as Logger$1, n as LogEnv, r as LogLevel } from "./logger-CxGXigv1.mjs"; import { i as AxiomTransportConfig } from "./create-CEY3e4NQ.mjs"; import { DestinationStream, Logger, LoggerOptions } from "pino"; //#region src/logger/console.d.ts /** * A zero-dependency {@link Logger} over the platform `console` — no Pino, no * worker thread, no transports. Use it in the browser, an edge runtime, or * React Native, or anywhere the Pino weight is not worth it. Structured calls * are emitted as `(message, contextObject)`; `child()` bindings are merged into * every line's context. * * There is no Axiom shipping here — that is a Node-transport concern. A * `ConsoleLogger` is for local visibility only. */ declare class ConsoleLogger implements Logger$1 { #private; constructor(options?: { level?: LogLevel; bindings?: Record; }); debug(obj: Record, msg?: string): void; debug(msg: string): void; info(obj: Record, msg?: string): void; info(msg: string): void; warn(obj: Record, msg?: string): void; warn(msg: string): void; error(obj: Record, msg?: string): void; error(msg: string): void; child(bindings: Record): Logger$1; flush(): Promise; } //#endregion //#region src/logger/context.d.ts /** * A fresh correlation id for one invocation. Every log line from a single run * carries this `runId`, so a whole run can be pulled back out of Axiom with * one query. */ declare function generateRunId(): string; /** * True when running inside CI. GitHub Actions (and most other providers) set * `CI=true`; we also accept any other non-empty, non-`false` value. */ declare function isCI(env?: NodeJS.ProcessEnv): boolean; /** `"ci"` inside CI, otherwise `"local"` — bound on every root logger. */ declare function detectEnv(env?: NodeJS.ProcessEnv): LogEnv; /** Narrow an arbitrary string to a {@link LogLevel}, or `undefined`. */ declare function parseLogLevel(value: string | undefined): LogLevel | undefined; /** * Resolve the effective log level in priority order: * * 1. `explicit` — an already-resolved level (a CLI flag, a config field) * passed by the caller. * 2. `HOLOCRON_LOG_LEVEL` env var. * 3. `"info"` default. * * An unrecognised value at any tier is ignored and resolution falls through. */ declare function resolveLevel(explicit?: LogLevel, env?: NodeJS.ProcessEnv): LogLevel; /** True when the Axiom transport must be suppressed via `HOLOCRON_TELEMETRY=false`. */ declare function isTelemetryDisabled(env?: NodeJS.ProcessEnv): boolean; /** * Resolve Axiom credentials from the environment — the canonical fallback * chain from ADR-0007. `createLogger` calls this when no explicit * `config.axiom` is supplied, so every consumer gets Axiom activation from env * vars alone. Credentials are read here and only here — never from a config * file. * * Returns `undefined` unless BOTH a token and a dataset are present. * * | Value | Primary | Fallback | * | -------- | ------------------------ | --------------- | * | token | `HOLOCRON_AXIOM_TOKEN` | `AXIOM_TOKEN` | * | dataset | `HOLOCRON_AXIOM_DATASET` | `AXIOM_DATASET` | */ declare function resolveAxiomFromEnv(env?: NodeJS.ProcessEnv): AxiomTransportConfig | undefined; //#endregion //#region src/logger/pino.d.ts /** * The Pino-backed {@link Logger}. Nothing outside this package should name it — * construct loggers with `createLogger`. It is a thin pass-through to a Pino * instance; the interface overloads mirror Pino's own, so each method is a * single delegated call. */ declare class PinoLogger implements Logger$1 { #private; constructor(instance: Logger); debug(obj: Record, msg?: string): void; debug(msg: string): void; info(obj: Record, msg?: string): void; info(msg: string): void; warn(obj: Record, msg?: string): void; warn(msg: string): void; error(obj: Record, msg?: string): void; error(msg: string): void; child(bindings: Record): Logger$1; /** * Wraps Pino's own callback-based `flush()` — for a worker-thread * transport (Axiom) this sends a `flushSync` message to the worker and * waits for its ack; for a plain destination (no transport) Pino resolves * it immediately. See {@link Logger.flush}'s own doc for why this exists. */ flush(): Promise; } interface CreatePinoInstanceInput { /** Resolved log level. */ level: LogLevel; /** Axiom credentials, if the transport should be wired. */ axiom?: AxiomTransportConfig; /** `true` inside CI. */ ci: boolean; /** `process.stdout.isTTY`. */ tty: boolean; /** `true` when `HOLOCRON_TELEMETRY=false`. */ telemetryDisabled: boolean; /** Bindings written on every line — `runId` and `env`. */ base: Record; /** * Write here instead of configuring transports. Used by tests to capture * output synchronously; never set in production. */ destination?: DestinationStream; /** * `false` suppresses all human-visible console output regardless of * `ci`/`tty`/level — Axiom (if wired) is unaffected. See * `buildTransport`'s doc for the full behavior matrix. */ consoleOutput?: boolean; } /** * Assemble the Pino `LoggerOptions`: resolved level, `runId` / `env` on every * line, ISO timestamps, sensitive-field redaction, and — unless a capture * `destination` is in play — the environment-appropriate transport from * {@link buildTransport}. */ declare function buildPinoOptions(input: CreatePinoInstanceInput): LoggerOptions; /** * Construct the underlying Pino instance. Writes to `destination` when one is * supplied (tests), to a null destination when the caller explicitly * suppressed console output and no transport ended up wired (nothing else to * write to — see {@link nullDestination}), otherwise to the transports * {@link buildPinoOptions} wired. */ declare function createPinoInstance(input: CreatePinoInstanceInput): Logger; //#endregion export { detectEnv as a, isTelemetryDisabled as c, resolveLevel as d, ConsoleLogger as f, createPinoInstance as i, parseLogLevel as l, PinoLogger as n, generateRunId as o, buildPinoOptions as r, isCI as s, CreatePinoInstanceInput as t, resolveAxiomFromEnv as u };