Is it possible to disable syslog messages?
Hello, first of all thanks for your work!
We have a use case where we don't need the syslog messages bluelog produces.
Is there a way to disable them?
I saw for example there is an UDPONLY option in the config file, but it seems syslog messages are still written.
Looking at the code I saw there's no if condition before the syslogs function calls, so I guess there's no method at the moment to disable them.
Thanks for your help, M.
Unless syslog mode is enabled, the only thing you should be seeing being reported to syslog is startup/shutdown and errors. Is that what you are referring to?
As you've noticed there is currently no way to prevent those messages from being sent to syslog, honestly it did not occur to me that they would bother anyone. But adding an option to disable syslog reporting completely would be easy enough to implement if that's what you need.
Out of curiosity, why exactly do you want to prevent the general status syslog messages? Are you seeing a lot of errors that are clogging up your logs?
Hi @MS3FGX , thanks for the quick reply! Our use case is an embedded environment where we don't want to write many things on the SD, and thus we make everything to keep the logs tiny. Moreover, we continously launch bluelog every two minutes, so it writes lots of init and quit messages to syslog, along the messages of all the devices he can't get the first time, etc.
I actually thought to add a -S option to disable syslog, and prepend all the syslog call with the config check, but for now I just commented all the syslog call in the code ;)
Would you be able to add this feature, or do you prefer I watch into this and let you know when I'll have a PR?
Thanks, M.
I can add this, though I would be happy to accept a PR if you get it done first.
But as there are already many command line options (and -s is already taken) I would rather see it as an option in the configuration file. Call it something like NOSYSLOG or something along those lines.
Would the option being in the configuration file be a problem for your application?
I guess it won't be a problem for us but i'll nee to do some checks because for now we don't use the config file, just command line options. I'll let you posted.
Cheers