-
Notifications
You must be signed in to change notification settings - Fork 892
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add asObjectBindingsOnly, allowing write to receive only the bindings as object #2051
base: main
Are you sure you want to change the base?
Conversation
… as object This allows to pass the format string and args as is the underlying console when to keep their special handling, for when using `write` to only modify the default way the printing to the console looks rather than writing to an alternate destination entirely. Part of pinojs#1556
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for opening a PR! Can you please add a unit test?
Can. you add some docs? |
Can you point me where to add them? Also do consider the naming and the exact semantics of this API, see the issues I opened for what I'm trying to eventually achieve. |
https://github.com/pinojs/pino/blob/main/docs/browser.md I think the name is ok. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this applicable to the core logger?
What do you mean? It's a variation of a flag that only exists in the browser version, where the output interface is different. |
This allows to pass the format string and args as
is the underlying console when to keep their
special handling, for when using
write
to onlymodify the default way the printing to the console
looks rather than writing to an alternate
destination entirely.
The name of the option and its behavior is obviously open for discussion
Part of #1556