From: Peter van Dijk Date: Fri, 1 Dec 2023 08:46:48 +0000 (+0100) Subject: Merge pull request #13062 from Habbie/auth-loglevel-prefix X-Git-Tag: rec-5.0.0-rc1~12 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0fcef103ed771e5b5bf2a1bcb0531f5d1b7a1668;p=thirdparty%2Fpdns.git Merge pull request #13062 from Habbie/auth-loglevel-prefix auth: add loglevel-show setting --- 0fcef103ed771e5b5bf2a1bcb0531f5d1b7a1668 diff --cc pdns/auth-main.cc index 4d803765f0,4e74f8e5b0..59a3e2111f --- a/pdns/auth-main.cc +++ b/pdns/auth-main.cc @@@ -1236,13 -1243,37 +1237,14 @@@ int main(int argc, char** argv g_log << Logger::Error << "Unknown logging facility " << ::arg().asNum("logging-facility") << endl; } - if (::arg().mustDo("master")) - ::arg().set("primary") = "yes"; - if (::arg().mustDo("slave")) - ::arg().set("secondary") = "yes"; - if (::arg().mustDo("slave-renotify")) - ::arg().set("secondary-do-renotify") = "yes"; - if (::arg().mustDo("superslave")) - ::arg().set("autosecondary") = "yes"; - if (::arg().mustDo("allow-unsigned-supermaster")) - ::arg().set("allow-unsigned-autoprimary") = "yes"; if (!::arg().isEmpty("domain-metadata-cache-ttl")) ::arg().set("zone-metadata-cache-ttl") = ::arg()["domain-metadata-cache-ttl"]; - if (!::arg().isEmpty("slave-cycle-interval")) - ::arg().set("xfr-cycle-interval") = ::arg()["slave-cycle-interval"]; // this mirroring back is on purpose, so that config dumps reflect the actual setting on both names - if (::arg().mustDo("primary")) - ::arg().set("master") = "yes"; - if (::arg().mustDo("secondary")) - ::arg().set("slave") = "yes"; - if (::arg().mustDo("secondary-do-renotify")) - ::arg().set("slave-renotify") = "yes"; - if (::arg().mustDo("autosecondary")) - ::arg().set("superslave") = "yes"; - if (::arg().mustDo("allow-unsigned-autoprimary")) - ::arg().set("allow-unsigned-supermaster") = "yes"; ::arg().set("domain-metadata-cache-ttl") = ::arg()["zone-metadata-cache-ttl"]; - ::arg().set("slave-cycle-interval") = ::arg()["xfr-cycle-interval"]; g_log.setLoglevel((Logger::Urgency)(::arg().asNum("loglevel"))); + g_log.setPrefixed(::arg().mustDo("loglevel-show")); g_log.disableSyslog(::arg().mustDo("disable-syslog")); g_log.setTimestamps(::arg().mustDo("log-timestamp")); g_log.toConsole((Logger::Urgency)(::arg().asNum("loglevel")));