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
|
|
@ -476,7 +476,8 @@ netconf_input_cb(int s,
|
||||||
cbmsg = NULL;
|
cbmsg = NULL;
|
||||||
break;
|
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)
|
if ((ret = netconf_input_frame2(cbmsg, YB_RPC, yspec, &xtop, &xerr)) < 0)
|
||||||
goto done;
|
goto done;
|
||||||
cbuf_reset(cbmsg);
|
cbuf_reset(cbmsg);
|
||||||
|
|
|
||||||
|
|
@ -2194,7 +2194,8 @@ netconf_output(int s,
|
||||||
char *buf = cbuf_get(cb);
|
char *buf = cbuf_get(cb);
|
||||||
int len = cbuf_len(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
|
#if 0 // Extra sanity check for debugging
|
||||||
{
|
{
|
||||||
cxobj *xt = NULL;
|
cxobj *xt = NULL;
|
||||||
|
|
|
||||||
|
|
@ -353,11 +353,15 @@ clixon_msg_send(int s,
|
||||||
{
|
{
|
||||||
int retval = -1;
|
int retval = -1;
|
||||||
|
|
||||||
clixon_debug(CLIXON_DBG_MSG | CLIXON_DBG_DETAIL, "send msg len=%lu", cbuf_len(cb));
|
if (descr){
|
||||||
if (descr)
|
clixon_debug(CLIXON_DBG_MSG, "Send [%s] len: %lu", descr, cbuf_len(cb));
|
||||||
clixon_debug(CLIXON_DBG_MSG, "Send [%s]: %s", descr, cbuf_get(cb));
|
clixon_debug(CLIXON_DBG_MSG | CLIXON_DBG_DETAIL, "Send [%s] %s", descr, cbuf_get(cb));
|
||||||
else
|
}
|
||||||
clixon_debug(CLIXON_DBG_MSG, "Send: %s", 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,
|
if (atomicio((ssize_t (*)(int, void *, size_t))write,
|
||||||
s, cbuf_get(cb), cbuf_len(cb)) < 0){
|
s, cbuf_get(cb), cbuf_len(cb)) < 0){
|
||||||
clixon_err(OE_CFG, errno, "atomicio");
|
clixon_err(OE_CFG, errno, "atomicio");
|
||||||
|
|
@ -428,10 +432,15 @@ clixon_msg_rcv10(int s,
|
||||||
clixon_debug(CLIXON_DBG_MSG, "Recv: EOF");
|
clixon_debug(CLIXON_DBG_MSG, "Recv: EOF");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (descr)
|
if (descr){
|
||||||
clixon_debug(CLIXON_DBG_MSG, "Recv [%s]: %s", descr, cbuf_get(cb));
|
clixon_debug(CLIXON_DBG_MSG, "Recv [%s] len: %lu", descr, cbuf_len(cb));
|
||||||
else
|
clixon_debug(CLIXON_DBG_MSG | CLIXON_DBG_DETAIL, "Recv [%s]: %s", descr, cbuf_get(cb));
|
||||||
clixon_debug(CLIXON_DBG_MSG, "Recv: %s", 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;
|
retval = 0;
|
||||||
done:
|
done:
|
||||||
|
|
@ -602,10 +611,15 @@ clixon_msg_rcv11(int s,
|
||||||
clixon_debug(CLIXON_DBG_MSG, "Recv: EOF");
|
clixon_debug(CLIXON_DBG_MSG, "Recv: EOF");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (descr)
|
if (descr){
|
||||||
clixon_debug(CLIXON_DBG_MSG, "Recv [%s]: %s", descr, cbuf_get(cbmsg));
|
clixon_debug(CLIXON_DBG_MSG, "Recv [%s] len: %lu", descr, cbuf_len(cbmsg));
|
||||||
else
|
clixon_debug(CLIXON_DBG_MSG | CLIXON_DBG_DETAIL, "Recv [%s]: %s", descr, cbuf_get(cbmsg));
|
||||||
clixon_debug(CLIXON_DBG_MSG, "Recv: %s", 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){
|
if (cb){
|
||||||
*cb = cbmsg;
|
*cb = cbmsg;
|
||||||
|
|
|
||||||
|
|
@ -911,7 +911,11 @@ yang_lib2yspec(clixon_handle h,
|
||||||
(ymod = yang_find(yspec, Y_MODULE, name)) != NULL &&
|
(ymod = yang_find(yspec, Y_MODULE, name)) != NULL &&
|
||||||
(ns2 = yang_find_mynamespace(ymod)) != NULL &&
|
(ns2 = yang_find_mynamespace(ymod)) != NULL &&
|
||||||
strcmp(ns, ns2) != 0) {
|
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);
|
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
|
#ifdef YANG_SCHEMA_MOUNT_YANG_LIB_FORCE
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue