Skip to content

Add bindings() method to browser logger - #2504

Open
RT1811 wants to merge 1 commit into
pinojs:mainfrom
RT1811:add-browser-bindings
Open

Add bindings() method to browser logger#2504
RT1811 wants to merge 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

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

1 participant