You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, this transport will not recognize using the names "warn", "err", and "panic". I know it is trying to just have parity with the log levels defined in the winston.config.syslog.levels object, but I already think that is kind of messed up because that object picks and chooses which log level names to use. For example, it uses "error" instead of "err" but uses the default level names for the rest of the levels.
I think it would be nice for the syslog transport module to allow all of the names above. Of course, the decision is up to the repository maintainers. It doesn't look like we actually use the numerical values corresponding to log level keywords, so the extra keywords could probably just be added in.
Or stuff could be changed to rely on the log level numerical value. This conflicts with an issue with winston.config.syslog.levels where the levels are reversed in Winston, which is actually the opposite of the levels in syslog. That is, "emerg" is considered 0 by syslog but should be 7 in winston.config.syslog.levels, however winston.config.syslog.levels currently has it as 0. See: winstonjs/winston#307
I'm not sure if using the number would mess with the message sent to syslog over the socket, though.
winston-rsyslog2 has support for mapping winston level names to syslog levels. You are welcome to port the code over. It's possible winston-rsyslog2 may work directly with syslog, but this hasn't been tested.
Syslog has the following log level names:
Currently, this transport will not recognize using the names "warn", "err", and "panic". I know it is trying to just have parity with the log levels defined in the
winston.config.syslog.levels
object, but I already think that is kind of messed up because that object picks and chooses which log level names to use. For example, it uses "error" instead of "err" but uses the default level names for the rest of the levels.I think it would be nice for the syslog transport module to allow all of the names above. Of course, the decision is up to the repository maintainers. It doesn't look like we actually use the numerical values corresponding to log level keywords, so the extra keywords could probably just be added in.
Like:
The text was updated successfully, but these errors were encountered: