Disable the rectify step during an outgoing AXFR. Only required for regression
testing.
+## `disable-syslog`
+* Boolean
+* Default: no
+
+Do not log to syslog, only to stdout. Use this setting when running inside a
+supervisor that handles logging (like systemd). **Note**: do not use this setting
+in combination with [`daemon`](#daemon) as all logging will disappear.
+
## `disable-tcp`
* Boolean
* Default: no
Turn off the packet cache. Useful when running with Lua scripts that can not be
cached.
+## `disable-syslog`
+* Boolean
+* Default: no
+
+Do not log to syslog, only to stdout. Use this setting when running inside a
+supervisor that handles logging (like systemd). **Note**: do not use this setting
+in combination with [`daemon`](#daemon) as all logging will disappear.
+
## `dnssec`
* One of `off`, `process`, `log-fail`, `validate`, String
* Default: `off` (**note**: was `process` until 4.0.0-alpha2)
::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";
Lock l(&m); // the C++-2011 spec says we need this, and OSX actually does
clog << string(buffer) + 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;
bool opened;
+ bool d_disableSyslog;
static pthread_once_t s_once;
static pthread_key_t s_loggerKey;
};
#
# 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("daemon","Operate as a daemon")="no";
::arg().setSwitch("write-pid","Write a PID file")="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")) {