Skip to content

Add bindings() method to browser logger - #2504

Merged
mcollina merged 1 commit into
pinojs:mainfrom
RT1811:add-browser-bindings
Sep 25, 2026
Merged

mcollina merged 1 commit into
pinojs:mainfrom
RT1811:add-browser-bindings

Conversation

@RT1811

@RT1811 RT1811 commented Aug 18, 2026

Copy link
Copy Markdown

Summary

Adds bindings() support to the browser logger to match the Node implementation.

  • Adds bindings() to browser logger instances
  • Preserves bindings inherited when child loggers are created
  • Ensures later parent setBindings() calls do not affect existing children
  • Keeps internal binding state separate from the public bindings() method
  • Adds browser tests for bindings behavior

Fixes #1177

Testing

  • Added test/browser-bindings.test.js
  • Existing browser-set-bindings.test.js tests pass
  • CI=1 npm test passes

@RT1811

RT1811 commented Sep 17, 2026

Copy link
Copy Markdown
Author

Hi! I noticed the CI workflow expired while awaiting approval, so the tests haven’t run yet. Could a maintainer please restart the workflow and approve it when they have a chance?

I’m happy to address any feedback or test failures once the checks run. Thanks for your time!

@mcollina mcollina left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

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.

bindings() and setBindings() are not present in the browser version of pino

2 participants