pino
pino copied to clipboard
[Question] Why is the browser version so different?
We use pino for all of our node.js applications, and we love it. We recently introduced pino to a browser application and we were surprised to find that it's almost a completely different implementation, exhibiting different behaviour.
There have been a large number of issues opened in this repo related to the differing behaviour, but all of them have the reply "We welcome a PR". I'd love to contribute to this project to help bring the browser implementation closer to the node.js version, but I'd like to know what the reasoning was for opting for a "simplistic version" for the browser? Were webworkers considered as a Worker Thread alternative? Why is there the options key browser
and why do some original options silently ignored? etc...
The fundamental reason is that pino was simpler back when the browser version was done, and given some browser limitations, certain things were not possible in 2016/2017. I think only a little work was spent on the version.
Another option is to spin it as a separate package and remove it from pino altogether.
If you are willing to work on the browser version, it would be amazinmg.
Another option is to spin it as a separate package and remove it from pino altogether.
It would be a shame to do this though, as there is plenty a part of this repo that I see the browser implementation using. The only differences would be the workers and the transport (part of the reason we're confused at the approach), but I appreciate I may not understand it all well enough.
Thanks for the insight - we'll have a think about what to do next.
Another option is to spin it as a separate package and remove it from pino altogether.
I support this proposal.