Allow custom levels comparison
obrus-corcentric opened this issue · 5 comments
I need levels to be compatible with syslog
.
So override values for example, like this, doesn't work:
Pino({
level: 'info',
customLevels: {
fatal: 2, // crit
error: 3, // err
warn: 4, // warn
info: 6, // information
debug: 7, // debug
trace: 8 // trace
},
})
The main problem here, that in syslog
lower number shows more critical level, but in pino
it works in opposite order.
So using syslog
levels determine fatal
as lower than debug
and set up level
to debug
, will show only debug
and trace
logs.
It would be nice to have ability setup order to compare level values or at least custom comparison function to be able filter logs correct
Thanks for reporting! Would you like to send a Pull Request to address this issue? Remember to add unit tests.
Thanks for reporting! Would you like to send a Pull Request to address this issue? Remember to add unit tests.
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.