summaryrefslogtreecommitdiff
path: root/lib/vty.c
diff options
context:
space:
mode:
authorChristian Hopps <chopps@labn.net>2024-07-22 07:52:10 -0400
committerMergify <37929162+mergify[bot]@users.noreply.github.com>2024-07-22 14:37:04 +0000
commite8506a06db2eb5fea4a65cd8077735f1b30f71cf (patch)
treea8d0b40a6f0a724d5c5bc1d760b59ff5bca1eaa5 /lib/vty.c
parentc9bd77c918d489899788bf016fc77dff5c68b1f8 (diff)
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> (cherry picked from commit 7afd7d99f2fa39be073625c630d46f96e5dd66a5)
Diffstat (limited to 'lib/vty.c')
-rw-r--r--lib/vty.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/lib/vty.c b/lib/vty.c
index 1c9cff478d..22858b937f 100644
--- a/lib/vty.c
+++ b/lib/vty.c
@@ -3574,8 +3574,9 @@ static void vty_mgmt_set_config_result_notified(
errmsg_if_any ? errmsg_if_any : "Unknown");
} else {
debug_fe_client("SET_CONFIG request for client 0x%" PRIx64
- " req-id %" PRIu64 " was successfull",
- client_id, req_id);
+ " req-id %" PRIu64 " was successfull%s%s",
+ client_id, req_id, errmsg_if_any ? ": " : "",
+ errmsg_if_any ?: "");
}
if (implicit_commit) {
@@ -3606,8 +3607,9 @@ static void vty_mgmt_commit_config_result_notified(
errmsg_if_any ? errmsg_if_any : "Unknown");
} else {
debug_fe_client("COMMIT_CONFIG request for client 0x%" PRIx64
- " req-id %" PRIu64 " was successfull",
- client_id, req_id);
+ " req-id %" PRIu64 " was successfull%s%s",
+ client_id, req_id, errmsg_if_any ? ": " : "",
+ errmsg_if_any ?: "");
if (errmsg_if_any)
vty_out(vty, "MGMTD: %s\n", errmsg_if_any);
}
@@ -3638,8 +3640,9 @@ static int vty_mgmt_get_data_result_notified(
}
debug_fe_client("GET_DATA request succeeded, client 0x%" PRIx64
- " req-id %" PRIu64,
- client_id, req_id);
+ " req-id %" PRIu64 "%s%s",
+ client_id, req_id, errmsg_if_any ? ": " : "",
+ errmsg_if_any ?: "");
if (req_id != mgmt_last_req_id) {
mgmt_last_req_id = req_id;