Skip to content

winston-syslog hardcodes log level to 'info' #184

@MikeJonesSoftware

Description

@MikeJonesSoftware

I'm using winston-syslog to forward messages to the local syslog server, like this:

levels: winston.config.syslog.levels, format: winston.format.simple(), transports: [ new winston.transports.Syslog({ host: '127.0.0.1', port: 514, type: 'RFC5424', level: 'debug' }) ]

In my code, I use logger.info(), logger.debug(), logger.error(), etc.
In the rsyslog.conf, I expect to be able to send these logs to various files based on the severity specified when I use logger.info(), logger.error(), etc. However, it seems like winston-syslog is sending every message as info. I can replace the format property with a custom printf(), and I see that 'logLevel' is in fact correct (info, error, etc), but in the rsyslog.conf, every message that comes from winston-syslog appears to have severity of 'info'. What am I doing wrong?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions