pino
pino copied to clipboard
feat: support for `maxLevel` in multistream
Fixes #1271
@jsumners Documentation added. Would like to know @mcollina opinion about allowedLevels, IMO it's not necessary
I would recommend we rename level to minLevel (aliasing it) to clarify it further.
Do you mean in StreamEntry or in internal stream array? If the first one do you plan to keep a back compatibility or a breaking change?
I'm not sure what StreamEntry is. I mean the same object where you added maxLevel. We would need to maintain backward compatibility.
@mcollina StreamEntry it's the type of the streams passed as object in multistream: https://github.com/pinojs/pino/blob/master/pino.d.ts#L249
The type could be that one or DestinationStream
BTW I can do that now or could we merge this and keep that for another PR?
I'd prefer to have it in this PR.
@mcollina LGTM or should we change the implementation like @jsumners suggested?
I think @jsumners objection is valid, so let's implement that instead.
In case we are looking for more feedback. How about using the existing level property, but allowing it to be an object as well with the following properties.
level: { min: 'info', max: 'warn' }
@thetutlage I think this PR stalled. Would you like to send a fresh one?
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.