::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";
clog<<buffer;
clog <<msg <<endl;
}
- if( u <= d_loglevel ) {
+ if( u <= d_loglevel && !d_disableSyslog ) {
#ifndef RECURSOR
S.ringAccount("logmessages",msg);
#endif
void toConsole(Urgency);
void setLoglevel( Urgency );
+ void disableSyslog(bool d) {
+ d_disableSyslog = d;
+ }
+
//! Log to a file.
void toFile( const string & filename );
Urgency d_loglevel;
Urgency consoleUrgency;
pthread_mutex_t lock;
+ bool d_disableSyslog;
};
extern Logger &theL(const string &pname="");
#
# disable-axfr-rectify=no
+#################################
+# disable-syslog Disable logging to syslog, useful when running inside a supervisor that logs stdout
+#
+# disable-syslog=no
+
#################################
# disable-tcp Do not listen to TCP queries
#
L.setName(s_programname);
L.setLoglevel((Logger::Urgency)(6)); // info and up
+ L.disableSyslog(::arg().mustDo("disable-syslog"));
if(!::arg()["logging-facility"].empty()) {
int val=logFacilityToLOG(::arg().asNum("logging-facility") );
::arg().set("trace","if we should output heaps of logging. set to 'fail' to only log failing domains")="off";
::arg().set("daemon","Operate as a daemon")="yes";
::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("log-common-errors","If we should log rather common errors")="yes";
::arg().set("chroot","switch to chroot jail")="";
::arg().set("setgid","If set, change group id to this gid for more security")="";
}
L.setLoglevel((Logger::Urgency)(::arg().asNum("loglevel")));
+ L.disableSyslog(::arg().mustDo("disable-syslog"));
L.toConsole((Logger::Urgency)(::arg().asNum("loglevel")));
if(::arg().mustDo("help") || ::arg().mustDo("config")) {