pino
pino copied to clipboard
Syslog severity level
Hi, I would like to implement syslog severity level as follows:
var pino = require("pino");
const customLevels = {
emerg: 0,
alert: 1,
crit: 2,
err: 3,
warning: 4,
notice: 5,
info: 6,
debug: 7
};
const logger = pino({ customLevels, useOnlyCustomLevels: true, level: 'debug' });
logger.alert('wooo');
But then this log is not presented, why?
I would set some breakpoints in https://github.com/pinojs/pino/blob/0a56154fa0a24ac2b4015b597e6ae06468821699/lib/levels.js to determine the cause.
But I'd also ask if using https://github.com/pinojs/pino-syslog is not possible.
@jsumners pino-syslog convert to syslog format, I'm just curious how to override default pino severity levels with syslog one, but severity value is upside down.
We established a log time ago that our algorithm is >= instead of <=. See https://github.com/pinojs/pino/issues/123
@jsumners any future plan to provide a callback to override this behaviour?
@cojack Did you manage to resolve this?
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.