Skip to content

Replace pino with @logtape/logtape in logging package#92

Draft
Copilot wants to merge 2 commits into
mainfrom
copilot/replace-pino-with-logtape
Draft

Replace pino with @logtape/logtape in logging package#92
Copilot wants to merge 2 commits into
mainfrom
copilot/replace-pino-with-logtape

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 17, 2026

Replaces pino (and its transport dependencies) with @logtape/logtape as the underlying logging engine in @nr1e/logging.

Dependency changes

  • pnpm-workspace.yaml: removed pino, pino-abstract-transport, sonic-boom; added @logtape/logtape@^2.0.4
  • logging/package.json: same swap in dependencies, removed peerDependencies block

Implementation changes (logging/src/logging.mts)

  • Logger class: no longer wraps a pino instance. Context (_bindings) and level (_level/_levelValue) are managed directly on the class. child() and newLogger() copy bindings at creation time.
  • initialize(): calls logtape's configureSync() (with reset: true) to register a custom JSON sink and suppress the logtape meta logger. pid/host/ip are seeded into the initial bindings rather than injected via pino mixins/formatters.
  • Custom JSON sink: formats records to the same output shape as before — {level, time, svc, msg, ...properties} — including level format (upper/lower/numeric) and timestamp format (epoch/iso/unix) options.
  • shutdown(): drops the root reference; no flush needed with a synchronous sink.
  • Removed: pino() escape-hatch method, transport option from LoggingConfig (both pino-specific).
  • Removed: automatic type override for non-Error objects now explicitly sets type: constructor.name (previously relied on pino's built-in error serializer).

Public API surface is otherwise unchanged — LogLevel, Logger, Entry, LoggingConfig, initialize, shutdown, getRootLogger, newLogger, isInitialized all retain the same signatures and behavior.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • jsr.io
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node /home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js (dns block)

If you need me to access, download, or install something from one of these locations, you can either:


💬 Send tasks to Copilot coding agent from Slack and Teams to turn conversations into code. Copilot posts an update in your thread when it's finished.

Co-authored-by: erikrj <365211+erikrj@users.noreply.github.com>
Copilot AI changed the title [WIP] Replace pino with logtape Replace pino with @logtape/logtape in logging package Mar 17, 2026
Copilot AI requested a review from erikrj March 17, 2026 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants