diff --git a/apps/netconf/netconf_main.c b/apps/netconf/netconf_main.c index a3232a47..8106a16c 100644 --- a/apps/netconf/netconf_main.c +++ b/apps/netconf/netconf_main.c @@ -476,7 +476,8 @@ netconf_input_cb(int s, cbmsg = NULL; break; } - clixon_debug(CLIXON_DBG_MSG, "Recv ext: %s", cbuf_get(cbmsg)); + clixon_debug(CLIXON_DBG_MSG, "Recv ext len: %lu", cbuf_len(cbmsg)); + clixon_debug(CLIXON_DBG_MSG | CLIXON_DBG_DETAIL, "Recv ext: %s", cbuf_get(cbmsg)); if ((ret = netconf_input_frame2(cbmsg, YB_RPC, yspec, &xtop, &xerr)) < 0) goto done; cbuf_reset(cbmsg); diff --git a/lib/src/clixon_netconf_lib.c b/lib/src/clixon_netconf_lib.c index 9d25f9d8..95ec244c 100644 --- a/lib/src/clixon_netconf_lib.c +++ b/lib/src/clixon_netconf_lib.c @@ -2194,7 +2194,8 @@ netconf_output(int s, char *buf = cbuf_get(cb); int len = cbuf_len(cb); - clixon_debug(CLIXON_DBG_MSG, "Send ext: %s", cbuf_get(cb)); + clixon_debug(CLIXON_DBG_MSG, "Send ext len: %lu", cbuf_len(cb)); + clixon_debug(CLIXON_DBG_MSG | CLIXON_DBG_DETAIL, "Send ext: %s", cbuf_get(cb)); #if 0 // Extra sanity check for debugging { cxobj *xt = NULL; diff --git a/lib/src/clixon_proto.c b/lib/src/clixon_proto.c index c9e0324e..bfa9dae9 100644 --- a/lib/src/clixon_proto.c +++ b/lib/src/clixon_proto.c @@ -353,11 +353,15 @@ clixon_msg_send(int s, { int retval = -1; - clixon_debug(CLIXON_DBG_MSG | CLIXON_DBG_DETAIL, "send msg len=%lu", cbuf_len(cb)); - if (descr) - clixon_debug(CLIXON_DBG_MSG, "Send [%s]: %s", descr, cbuf_get(cb)); - else - clixon_debug(CLIXON_DBG_MSG, "Send: %s", cbuf_get(cb)); + if (descr){ + clixon_debug(CLIXON_DBG_MSG, "Send [%s] len: %lu", descr, cbuf_len(cb)); + clixon_debug(CLIXON_DBG_MSG | CLIXON_DBG_DETAIL, "Send [%s] %s", descr, cbuf_get(cb)); + } + else{ + clixon_debug(CLIXON_DBG_MSG, "Send len: %lu", cbuf_len(cb)); + clixon_debug(CLIXON_DBG_MSG | CLIXON_DBG_DETAIL, "Send %s", cbuf_get(cb)); + } + if (atomicio((ssize_t (*)(int, void *, size_t))write, s, cbuf_get(cb), cbuf_len(cb)) < 0){ clixon_err(OE_CFG, errno, "atomicio"); @@ -428,10 +432,15 @@ clixon_msg_rcv10(int s, clixon_debug(CLIXON_DBG_MSG, "Recv: EOF"); } else { - if (descr) - clixon_debug(CLIXON_DBG_MSG, "Recv [%s]: %s", descr, cbuf_get(cb)); - else - clixon_debug(CLIXON_DBG_MSG, "Recv: %s", cbuf_get(cb)); + if (descr){ + clixon_debug(CLIXON_DBG_MSG, "Recv [%s] len: %lu", descr, cbuf_len(cb)); + clixon_debug(CLIXON_DBG_MSG | CLIXON_DBG_DETAIL, "Recv [%s]: %s", descr, cbuf_get(cb)); + } + else{ + clixon_debug(CLIXON_DBG_MSG, "Recv len: %lu", cbuf_len(cb)); + clixon_debug(CLIXON_DBG_MSG | CLIXON_DBG_DETAIL, "Recv: %s", cbuf_get(cb)); + } + } retval = 0; done: @@ -602,10 +611,15 @@ clixon_msg_rcv11(int s, clixon_debug(CLIXON_DBG_MSG, "Recv: EOF"); } else { - if (descr) - clixon_debug(CLIXON_DBG_MSG, "Recv [%s]: %s", descr, cbuf_get(cbmsg)); - else - clixon_debug(CLIXON_DBG_MSG, "Recv: %s", cbuf_get(cbmsg)); + if (descr){ + clixon_debug(CLIXON_DBG_MSG, "Recv [%s] len: %lu", descr, cbuf_len(cbmsg)); + clixon_debug(CLIXON_DBG_MSG | CLIXON_DBG_DETAIL, "Recv [%s]: %s", descr, cbuf_get(cbmsg)); + } + else{ + clixon_debug(CLIXON_DBG_MSG, "Recv len: %lu", cbuf_len(cbmsg)); + clixon_debug(CLIXON_DBG_MSG | CLIXON_DBG_DETAIL, "Recv: %s", cbuf_get(cbmsg)); + } + } if (cb){ *cb = cbmsg; @@ -613,7 +627,7 @@ clixon_msg_rcv11(int s, } retval = 0; done: - clixon_debug(CLIXON_DBG_MSG|CLIXON_DBG_DETAIL, "%s done", __FUNCTION__); + clixon_debug(CLIXON_DBG_MSG | CLIXON_DBG_DETAIL, "%s done", __FUNCTION__); if (intr){ if (clixon_signal_restore(&oldsigset, oldsigaction) < 0) goto done; diff --git a/lib/src/clixon_yang_module.c b/lib/src/clixon_yang_module.c index fa47e0ca..e9e6f928 100644 --- a/lib/src/clixon_yang_module.c +++ b/lib/src/clixon_yang_module.c @@ -911,7 +911,11 @@ yang_lib2yspec(clixon_handle h, (ymod = yang_find(yspec, Y_MODULE, name)) != NULL && (ns2 = yang_find_mynamespace(ymod)) != NULL && strcmp(ns, ns2) != 0) { +#if 1 + clixon_debug(CLIXON_DBG_YANG, "Mount:%s module %s namespace mismatch %s announced vs %s in loaded module", mntpnt, name, ns, ns2); +#else clixon_log(h, LOG_WARNING, "Mount:%s module %s namespace mismatch %s announced vs %s in loaded module", mntpnt, name, ns, ns2); +#endif } } #ifdef YANG_SCHEMA_MOUNT_YANG_LIB_FORCE