Hide 'Init SSL without certificate database' message for upsc#1662
Hide 'Init SSL without certificate database' message for upsc#1662tofurky wants to merge 1 commit intonetworkupstools:masterfrom
Conversation
This can clutter up logs on things that call 'upsc', such as Munin plugins. Switch it to upsdebugx() so it's not always output to stderr.
|
unsure if both the Init SSL messages should go to upsdebugx (or neither, really). |
|
One alternative is to use debug level 0 so it always pops up on stderr like now, but does not hit the syslog. |
|
Asked community on mailing lists - if insecurity reminders were deemed useful. |
|
Question: which logs does it clutter - syslog (thanks to |
|
munin writes unhandled stderr to syslog (*/5): i suppose the munin plugin could be modified to redirect stderr to /dev/null, but that'd also remove useful errors. my reasoning was that adding a grep -v pipe would add extra overhead. i think it'd also require redirecting stderr to stdout which would mess with the parser if other errors were emitted. thanks for putting a feeler out. edit: it does not write to syslog by default. i think it writes to /var/log/munin/munin-node.log. |
|
FWIW, a link to stirred-up discussion : https://alioth-lists.debian.net/pipermail/nut-upsdev/2022-September/007761.html |
|
So far it seems the proposition is reasonable, but this quiescing should be non-default. Might be activated by an envvar and/or command-line option. since |
|
i think an env variable might work. adding a new cli flag wouldn't really be usable if it gave a syntax error when it's unsupported. i did look pretty closely at how NSS is initialized, and the conclusion i came to is that simply changing the verbosity of the message was the most straightforward thing to do. |
… hide "Init SSL without certificate database" message [networkupstools#1662]
|
Thanks for raising the concern about "a syntax error when it's unsupported", so I posted a PR for an envvar-based solution. Can you check if that looks good for your purposes? |
|
yep, it should work. left a note there as well. thanks! |
…orkupstools#1662] Signed-off-by: Jim Klimov <[email protected]>
This can clutter up logs on things that call 'upsc', such as Munin plugins. Switch it to upsdebugx() so it's not always output to stderr.