Skip to content

Logger

Defined in: observability/src/core/logger.ts:13

The logging surface every consumer depends on.

Call sites import Logger — never Pino directly. The concrete implementation (PinoLogger, or the zero-dep ConsoleLogger) is hidden behind this interface so the logging library can be swapped without touching a single call site.

The overloads mirror Pino’s native API: pass a context object first for structured logging (log.info({ repo }, "sync complete")) or a bare string for a simple line (log.info("sync complete")).

child(bindings): Logger

Defined in: observability/src/core/logger.ts:31

Derive a child logger that inherits every binding from its parent and adds its own. Used to attach per-module context (module, repo, …) without threading extra fields through every call.

Record<string, unknown>

Logger


debug(obj, msg?): void

Defined in: observability/src/core/logger.ts:15

Logs a verbose line, either a context object with an optional message or a bare string.

Record<string, unknown>

string

void

debug(msg): void

Defined in: observability/src/core/logger.ts:16

string

void


error(obj, msg?): void

Defined in: observability/src/core/logger.ts:24

Logs a failure, either a context object with an optional message or a bare string.

Record<string, unknown>

string

void

error(msg): void

Defined in: observability/src/core/logger.ts:25

string

void


flush(): Promise<void>

Defined in: observability/src/core/logger.ts:44

Resolve once every line logged so far has actually left the process.

Matters specifically for a worker-thread transport (Axiom): the call that enqueues a line returns before that line reaches the network — the worker thread needs its own event-loop turn to flush the batch over HTTP. A short-lived process (a serverless function returning its response) can exit before that turn happens, silently dropping every buffered line. Call this before returning from such a handler; a synchronous sink (ConsoleLogger, NoopLogger, plain stdout NDJSON with no transport) has nothing to wait for and resolves immediately.

Promise<void>


info(obj, msg?): void

Defined in: observability/src/core/logger.ts:18

Logs a routine progress line, either a context object with an optional message or a bare string.

Record<string, unknown>

string

void

info(msg): void

Defined in: observability/src/core/logger.ts:19

string

void


warn(obj, msg?): void

Defined in: observability/src/core/logger.ts:21

Logs a recoverable problem, either a context object with an optional message or a bare string.

Record<string, unknown>

string

void

warn(msg): void

Defined in: observability/src/core/logger.ts:22

string

void