-
Notifications
You must be signed in to change notification settings - Fork 0
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
How we will include pino to node core? #4
Comments
The dependencies of pino, pino-abstract-transport:
I removed pino-pretty, we can include it later. There are some dependencies that we can strip/remove and just use the original code: PinoTo be copied:
To be removed:
To be decided:
To keep as a package:
Pino Abstract TransportThis package can be copied to core of pino. Talking about those dependencies: To be removed:
The final result will look like:
|
/cc @mcollina @jsumners @davidmarkclements @watson Pinging you guys just to let you know what I'm trying to do, and see if makes sense to continue this research/efforts to try to include a logging lib on node core based on Pino. Pino has a lot of good features but I think to include them on node we will need to limit the number of features that we want to expose (this is my assumption), eg: maybe do not include redact in this initial version, do not include safe-stable-stringify, expose To achieve that, or I create a fork of pino to strip all those features and just leave the bare minimum (like in my previous comment on this issue), or I try to work with you guys to push those changes on pino to shape pino to be more compatible to core (assuming that we don't want to have features of pino on core that are not used). The first option is easier in terms of implementation but harder in terms of maintenance since we will have 2 versions of pino (in case the proposal is accepted). The second option is easier to maintain but will strip some good features that pino already exposes by default (redact/handle circular reference), and will require some breaking changes on pino. Let me know what you guys think about these approaches, do you think they make sense or do you have other ways to approach this problem? |
I feel like I'm missing a lot of context. Are there conversations happening somewhere else about this? |
I re-opened this issue: nodejs/node#49296 It was on a conversation on Twitter, people suggested that we can introduce Pino on Node like people did with Undici, so everything started. |
This comment basically indicates we need to re-create pino. About the dependencies, I will probably only leave |
I think both sonic-boom and thread-stream should be re-implemented inside Node.js core as well, as the latter would likely not work when embedded into core. The former would benefit in speed by using some C++ magic. |
I initially thought in including sonic-boom and thread-stream as dependencies because I didn't have a clear vision of how we could expose those modules on core. Maybe sonic boom can be something like The Moving those libraries on core means I need to defend 3 different features instead of just one (with deps). But if you think it's worth, I can try to work on adding those deps first, but I will need some guidance on the exposed API since you have more context than me on why those libraries are better/useful than what we have today. |
We will do something like
undici
and include the entire lib as a dependency?Or we want to push just the core and then start pushing the code of the library to the core of pino and introduce this as raw code on Node (using primordials, etc...)
I have zero idea, so I'm open to suggestions.
Update
We will basically rewrite pino to be included on Node core, bringing also the dependencies (by making our own code, or bringing to core)
The text was updated successfully, but these errors were encountered: