forked from Mirror/frr
lib: move non-error from __log_err to __dbg
Additionally, print `errmsg_if_any` in successful debug messages if non-NULL. fixes #16386 #16043 Signed-off-by: Christian Hopps <chopps@labn.net>
This commit is contained in:
parent
9de961dc42
commit
7afd7d99f2
15
lib/vty.c
15
lib/vty.c
|
@ -3591,8 +3591,9 @@ static void vty_mgmt_set_config_result_notified(
|
||||||
vty_out(vty, "%s\n", errmsg_if_any);
|
vty_out(vty, "%s\n", errmsg_if_any);
|
||||||
} else {
|
} else {
|
||||||
debug_fe_client("SET_CONFIG request for client 0x%" PRIx64
|
debug_fe_client("SET_CONFIG request for client 0x%" PRIx64
|
||||||
" req-id %" PRIu64 " was successfull",
|
" req-id %" PRIu64 " was successfull%s%s",
|
||||||
client_id, req_id);
|
client_id, req_id, errmsg_if_any ? ": " : "",
|
||||||
|
errmsg_if_any ?: "");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (implicit_commit) {
|
if (implicit_commit) {
|
||||||
|
@ -3624,8 +3625,9 @@ static void vty_mgmt_commit_config_result_notified(
|
||||||
vty_out(vty, "%s\n", errmsg_if_any);
|
vty_out(vty, "%s\n", errmsg_if_any);
|
||||||
} else {
|
} else {
|
||||||
debug_fe_client("COMMIT_CONFIG request for client 0x%" PRIx64
|
debug_fe_client("COMMIT_CONFIG request for client 0x%" PRIx64
|
||||||
" req-id %" PRIu64 " was successfull",
|
" req-id %" PRIu64 " was successfull%s%s",
|
||||||
client_id, req_id);
|
client_id, req_id, errmsg_if_any ? ": " : "",
|
||||||
|
errmsg_if_any ?: "");
|
||||||
if (errmsg_if_any)
|
if (errmsg_if_any)
|
||||||
vty_out(vty, "MGMTD: %s\n", errmsg_if_any);
|
vty_out(vty, "MGMTD: %s\n", errmsg_if_any);
|
||||||
}
|
}
|
||||||
|
@ -3656,8 +3658,9 @@ static int vty_mgmt_get_data_result_notified(
|
||||||
}
|
}
|
||||||
|
|
||||||
debug_fe_client("GET_DATA request succeeded, client 0x%" PRIx64
|
debug_fe_client("GET_DATA request succeeded, client 0x%" PRIx64
|
||||||
" req-id %" PRIu64,
|
" req-id %" PRIu64 "%s%s",
|
||||||
client_id, req_id);
|
client_id, req_id, errmsg_if_any ? ": " : "",
|
||||||
|
errmsg_if_any ?: "");
|
||||||
|
|
||||||
if (req_id != mgmt_last_req_id) {
|
if (req_id != mgmt_last_req_id) {
|
||||||
mgmt_last_req_id = req_id;
|
mgmt_last_req_id = req_id;
|
||||||
|
|
|
@ -980,8 +980,8 @@ static int mgmt_txn_create_config_batches(struct mgmt_txn_req *txn_req,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!chg_clients)
|
if (!chg_clients)
|
||||||
__log_err("No connected daemon is interested in XPATH %s",
|
__dbg("Daemons interested in XPATH are not currently connected: %s",
|
||||||
xpath);
|
xpath);
|
||||||
|
|
||||||
cmtcfg_req->clients |= chg_clients;
|
cmtcfg_req->clients |= chg_clients;
|
||||||
|
|
||||||
|
@ -992,7 +992,7 @@ static int mgmt_txn_create_config_batches(struct mgmt_txn_req *txn_req,
|
||||||
if (!num_chgs) {
|
if (!num_chgs) {
|
||||||
(void)mgmt_txn_send_commit_cfg_reply(txn_req->txn,
|
(void)mgmt_txn_send_commit_cfg_reply(txn_req->txn,
|
||||||
MGMTD_NO_CFG_CHANGES,
|
MGMTD_NO_CFG_CHANGES,
|
||||||
"No changes found to commit!");
|
"No connected daemons interested in changes");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue