From: bert hubert Date: Mon, 2 May 2016 11:01:35 +0000 (+0200) Subject: this wins no prizes - our protobuf logger is used both in dnsdist and recursor and... X-Git-Tag: rec-4.0.0-alpha3~20^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=49cfc1047242fb129af5c6c970788b4112352d29;p=thirdparty%2Fpdns.git this wins no prizes - our protobuf logger is used both in dnsdist and recursor and sometimes needs to log. We previously did that to cerr since dnsdist and recursor have different logging promitives. This adds #ifdef based support for both. It works, is the best I can say about it. --- diff --git a/pdns/remote_logger.cc b/pdns/remote_logger.cc index a71018f64e..86835782c1 100644 --- a/pdns/remote_logger.cc +++ b/pdns/remote_logger.cc @@ -1,6 +1,12 @@ #include - #include "remote_logger.hh" +#include "config.h" +#ifdef PDNS_CONFIG_ARGS +#include "logger.hh" +#define WE_ARE_RECURSOR +#else +#include "dolog.hh" +#endif bool RemoteLogger::reconnect() { @@ -13,7 +19,11 @@ bool RemoteLogger::reconnect() setNonBlocking(d_socket); } catch(const std::exception& e) { - std::cerr<<"Error connecting to remote logger "<