Mailing List Archive

[PATCH 08/23] lib: qzc debug log are conditioned with a debug variable
This variable can be set by compilation, if there is a need to monitor
qzc exchanges.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
---
lib/qzc.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/lib/qzc.c b/lib/qzc.c
index 358b7e419eef..7425743f8cea 100644
--- a/lib/qzc.c
+++ b/lib/qzc.c
@@ -31,6 +31,8 @@

#include "qzc.capnp.h"

+static int qzc_debug = 0;
+
static struct qzc_wkn *wkn_first = NULL;

void qzc_wkn_reg(struct qzc_wkn *wkn)
@@ -296,7 +298,8 @@ static void qzc_callback (void *arg, void *zmqsock, zmq_msg_t *msg)
capn_free(&ctx);
capn_free(&rc);

- zlog_info ("QZC request type %d, response type %d, %zd bytes, error=%d", req.which, rep.which, rs, rep.error);
+ if(qzc_debug)
+ zlog_debug ("QZC request type %d, response type %d, %zd bytes, error=%d", req.which, rep.which, rs, rep.error);
zmq_send (zmqsock, buf, rs, 0);

do
--
2.1.4


_______________________________________________
Quagga-dev mailing list
Quagga-dev@lists.quagga.net
https://lists.quagga.net/mailman/listinfo/quagga-dev
[PATCH 08/23] lib: qzc debug log are conditioned with a debug variable [ In reply to ]
This variable can be set by compilation, if there is a need to monitor
qzc exchanges.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
---
lib/qzc.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/lib/qzc.c b/lib/qzc.c
index 358b7e419eef..7425743f8cea 100644
--- a/lib/qzc.c
+++ b/lib/qzc.c
@@ -31,6 +31,8 @@

#include "qzc.capnp.h"

+static int qzc_debug = 0;
+
static struct qzc_wkn *wkn_first = NULL;

void qzc_wkn_reg(struct qzc_wkn *wkn)
@@ -296,7 +298,8 @@ static void qzc_callback (void *arg, void *zmqsock, zmq_msg_t *msg)
capn_free(&ctx);
capn_free(&rc);

- zlog_info ("QZC request type %d, response type %d, %zd bytes, error=%d", req.which, rep.which, rs, rep.error);
+ if(qzc_debug)
+ zlog_debug ("QZC request type %d, response type %d, %zd bytes, error=%d", req.which, rep.which, rs, rep.error);
zmq_send (zmqsock, buf, rs, 0);

do
--
2.1.4


_______________________________________________
Quagga-dev mailing list
Quagga-dev@lists.quagga.net
https://lists.quagga.net/mailman/listinfo/quagga-dev