Open jsumners opened 7 years ago
I think this can be a very simple module that sets some defaults for child_process
, meaning correctly passing around the file descriptors for it to work. Ideally, we should just pass around the main process stdout, and let let client die if the main dies.
I do not think it is pino-specific either, we can just have a quick & easy module that we maintain.
That sounds reasonable.
This is sort of what https://github.com/jsumners/pipeline-manifold does.
@jsumners yes. But with a simpler API that can be used from within node.
I like pino-root
.
that does not give us the simplicity I would like to have, IMHO it should be a one-liner with the pino creation.
It sounds like you have a clear idea in mind. Do you want to implement it?
@jsumners yes, I'll give it a go.
In case you're interested, I've added a new feature to pino-spawn where it passes bunyan-like streams config to the child process via stringified functions (check the readme). The child will then eval() the functions (most likely require()ing external libs), and then do its thing as before.
This allows using existing bunyan transports with (almost) the same config.
I don't know what I think about that.
See https://github.com/atis--/pino-spawn/issues/1
Basically, it would provide a stream for Pino to write to. This stream would be spawned or forked via
child_process
.Maybe
pino-root
?cc @pinojs/core