]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Merge pull request #13062 from Habbie/auth-loglevel-prefix
authorPeter van Dijk <peter.van.dijk@powerdns.com>
Fri, 1 Dec 2023 08:46:48 +0000 (09:46 +0100)
committerGitHub <noreply@github.com>
Fri, 1 Dec 2023 08:46:48 +0000 (09:46 +0100)
auth: add loglevel-show setting

1  2 
pdns/auth-main.cc

index 4d803765f02a76fbf33f15377dfedd1302564b76,4e74f8e5b05deeede72647a1a865b91bd5a311d3..59a3e2111fd783240efc893498e50edf745d7ec2
@@@ -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")));