Closed nschoe closed 7 years ago
It seems that the syslog levels are exactly the same than journald ones.
The only exception is error that become err in journald. There is already an automatic levelname mapping from syslog to journald.
I think you just can do : winston.setLevels(winston.config.syslog.levels);
and then use syslog levels in your code (winson.crit, winston.error etc...)
I currently add
winston-journald
like this (as per the documentation):The problem is that
winston.crit('foo')
returnsError: Unknown log level: crit
.In the doc for winston, I see we should be able to
winston.setLevels(winston.config.Journald.levels)
(then give the example withsyslog
), but when I print the content ofwinston.config
I've got this:And there is no
Journald
. So how can I add them?