From 280d6657a8d226a1043b7a4fc1613af0bb90a3ed Mon Sep 17 00:00:00 2001 From: Pieter Lexis Date: Tue, 15 Mar 2016 11:51:43 +0100 Subject: [PATCH] Add a disable-syslog setting This allows the use of e.g. the `Type=simple` in systemd and prevents the double logging issue. --- pdns/common_startup.cc | 1 + pdns/logger.cc | 2 +- pdns/logger.hh | 5 +++++ pdns/pdns.conf-dist | 5 +++++ pdns/pdns_recursor.cc | 2 ++ pdns/receiver.cc | 1 + 6 files changed, 15 insertions(+), 1 deletion(-) diff --git a/pdns/common_startup.cc b/pdns/common_startup.cc index 45ab21dc06..b9c2165de5 100644 --- a/pdns/common_startup.cc +++ b/pdns/common_startup.cc @@ -78,6 +78,7 @@ void declareArguments() ::arg().set("version-string","PowerDNS version in packets - full, anonymous, powerdns or custom")="full"; ::arg().set("control-console","Debugging switch - don't use")="no"; // but I know you will! ::arg().set("loglevel","Amount of logging. Higher is more. Do not set below 3")="4"; + ::arg().set("disable-syslog","Disable logging to syslog, useful when running inside a supervisor that logs stdout")="no"; ::arg().set("default-soa-name","name to insert in the SOA record if none set in the backend")="a.misconfigured.powerdns.server"; ::arg().set("default-soa-mail","mail address to insert in the SOA record if none set in the backend")=""; ::arg().set("distributor-threads","Default number of Distributor (backend) threads to start")="3"; diff --git a/pdns/logger.cc b/pdns/logger.cc index 5e6fd2b8b0..6357bffa62 100644 --- a/pdns/logger.cc +++ b/pdns/logger.cc @@ -50,7 +50,7 @@ void Logger::log(const string &msg, Urgency u) clog<