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")).
Methods
Section titled “Methods”child()
Section titled “child()”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.
Parameters
Section titled “Parameters”bindings
Section titled “bindings”Record<string, unknown>
Returns
Section titled “Returns”Logger
debug()
Section titled “debug()”Call Signature
Section titled “Call Signature”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.
Parameters
Section titled “Parameters”Record<string, unknown>
string
Returns
Section titled “Returns”void
Call Signature
Section titled “Call Signature”debug(
msg):void
Defined in: observability/src/core/logger.ts:16
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”void
error()
Section titled “error()”Call Signature
Section titled “Call Signature”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.
Parameters
Section titled “Parameters”Record<string, unknown>
string
Returns
Section titled “Returns”void
Call Signature
Section titled “Call Signature”error(
msg):void
Defined in: observability/src/core/logger.ts:25
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”void
flush()
Section titled “flush()”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.
Returns
Section titled “Returns”Promise<void>
info()
Section titled “info()”Call Signature
Section titled “Call Signature”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.
Parameters
Section titled “Parameters”Record<string, unknown>
string
Returns
Section titled “Returns”void
Call Signature
Section titled “Call Signature”info(
msg):void
Defined in: observability/src/core/logger.ts:19
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”void
warn()
Section titled “warn()”Call Signature
Section titled “Call Signature”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.
Parameters
Section titled “Parameters”Record<string, unknown>
string
Returns
Section titled “Returns”void
Call Signature
Section titled “Call Signature”warn(
msg):void
Defined in: observability/src/core/logger.ts:22
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”void