Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
MikeJonesSoftware opened this issue Apr 16, 2022 · 1 comment
Open

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

MikeJonesSoftware opened this issue Apr 16, 2022 · 1 comment

Comments

@MikeJonesSoftware
Copy link

MikeJonesSoftware commented Apr 16, 2022

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?

@wbt
Copy link
Contributor

wbt commented Apr 28, 2022

I think this usage inquiry may be a better question for posting on StackOverflow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants