pino
pino copied to clipboard
Spec
It'd be great if we could document the JSON spec that Pino uses. This will allow us to implement pino-compatible loggers in other languages (such as Rust, which has my current interest).
It seems that Pino mostly uses the Bunyan spec, but with the addition that time can be a Unix epoch.
Our efforts here should probably be twofold:
- gather a comprehensive set of examples of pino output.
- write a spec under https://github.com/pinojs/pino/tree/next-major/docs
Porting to Rust
My personal interest is to implement a Rust version, so for me to at least make a start on this would mostly require a collection of pino JSON output. I can then use this to write a serde struct that can parse it. Perhaps this could serve as a good reference for which parts of the spec are missing / unclear.
Unresolved questions
I'm not sure what we should call the spec. Pino? Bunyan? I don't know.
I'm also still a bit unclear on what the right way to extend JSON is. I know I've done some gnarly things in the past, but wanted to check in if there's a better way of approaching this.
Thanks heaps!
Further Reading
- https://twitter.com/matteocollina/status/1026419876121006081
Absolutely +1 on this, one note - we'll be releasing 5 very soon, so the PR may end up being to master
"Newline delimited JSON logging specification" ?
NDJSON-log, yeah I can see that work. Probably have to make sure it's clear it's a superset of the http://ndjson.org/ spec.
Yeah - that's perfect
On Mon, 6 Aug 2018 at 07:11, Yoshua Wuyts [email protected] wrote:
NDJSON-log, yeah I can see that work. Probably have to make sure it's clear it's a superset of the http://ndjson.org/ spec.
— You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/pinojs/pino/issues/471#issuecomment-410673689, or mute the thread https://github.com/notifications/unsubscribe-auth/ABIrPIqfHxI7-CcG4PCGwXsC5b89qKM1ks5uOCRVgaJpZM4VwLw7 .
@yoshuawuyts is this still meaningful to you/still something you want to do?
@davidmarkclements having a spec would still be useful!
I'm also interest in getting a spec.
My scenario: I'm using some Rust libraries so some part of my program is written in Rust and using Napi it is exposed to nodejs. So, I want to do some logging in Rust code as well. Preferably I'd like to do it from Rust which which can be made Pino-compatible without resorting to Napi or else I need to create wrapper for Pino in Rust.
Any update on this would be helpful.
This would be great to do... any volunteers?