Move debug msg to msg+detail, only msg length in debug level msg
Move log warning of namespace mismatch to debug
This commit is contained in:
parent
1994a405dd
commit
ba40f5a929
4 changed files with 36 additions and 16 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue