PowerDNS / pdns

PowerDNS Authoritative, PowerDNS Recursor, dnsdist
https://www.powerdns.com/
GNU General Public License v2.0
3.59k stars 901 forks source link

pdns_server --version writes to STDERR instead of STDOUT #14455

Closed paddg closed 1 month ago

paddg commented 1 month ago

Short description

pdns_server --version writes its output to STDERR. In my opinion this is wrong because there is no error. It is also not consistent with dnsdist and Recursor.

Environment

Steps to reproduce

pdns_server --version 2>/dev/null

does not show anything, which is wrong.

Expected behaviour

It would be nice if pdns_server --version would write to STDOUT instead of STDERR

Actual behaviour

pdns_server --version writes to STDERR

omoerbeek commented 1 month ago

This should be consistent for all products. Fixing this requires some plumbing in showProductVersion() and friends, which now are hardcoded to use logging, which used the C++ stream clog, which is sent to stderr.

omoerbeek commented 1 month ago

Fixed in #14518

paddg commented 1 month ago

Thank you!