Closed PavelPolyakov closed 6 years ago
No there is not. The format is fixed for good reasons, the tools needs to process things in a consistent way. I don't see this changing in any forseeable future.
hi @mcollina, thanks for the quick answer.
The format is fixed for good reasons
I'm sure you have a reason for that.
Here is my use case:
AND level:"error"
There are several solutions for this problem, including:
key
which shows the levelI do not suggest to change something, but to give control over this.
Maybe alike the messageKey
there can be an option levelKey
? This will make possible use variant 1.
Or something like timestamp
function, (but it should receive the number as input).
Duplicate of #279.
Also see https://github.com/pinojs/pino/issues/271#issuecomment-317545529
@jsumners Thanks
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Hello,
Once again thanks for the module. I met another issue during the attempts to shape it to my needs. For some good reason it was decided that
level
in the logs is printed asint
.In my case I'd prefer to have it as string.
First I thought that I can overwrite it using
serializers
:Result:
But this doesn't work, probably because level is "core" log property. And serialisers are only applied to the properties of the objects you log.
Is there an expected way to manipulate the
level
and how it's displayed?* it is possible to do it using
prettyPrint
, but this is not an option, since I log into the custom stream.Regards,