Open
Description
Looking at Winston documentation about Logging levels (https://github.com/winstonjs/winston#logging-levels) and the documentation on Syslog protocol (https://fr.wikipedia.org/wiki/Syslog#Niveau_de_gravité) it seems that we are defining levels the wrong way: https://github.com/AirVantage/node-tech-logger/blob/master/techLogger.js#L18-L30
Seems that we had some troubles to set up that:
// Winston levels correctly ordered
// DO NOT TRUST Winston level definition as it does not comply to a "logical" threshold mechanism
const LEVELS_CONFIG = {
levels: {
emerg: 7,
alert: 6,
crit: 5,
error: 4,
warn: 3,
notice: 2,
info: 1,
debug: 0
}
};
😅
So it might be an opportunity to migrate to a newer Winston version (3.x)?
At the same time, we noticed that when calling logger.warn()
the message was available on Cloudwatch, but not on Loggly side... could be linked to the erratic previous behavior.
Just for information, we had to fix this bug previously, see 7af07cc