]> git.puffer.fish Git - matthieu/frr.git/commitdiff
lib: move non-error from __log_err to __dbg
authorChristian Hopps <chopps@labn.net>
Mon, 22 Jul 2024 11:52:10 +0000 (07:52 -0400)
committerMergify <37929162+mergify[bot]@users.noreply.github.com>
Mon, 22 Jul 2024 14:37:04 +0000 (14:37 +0000)
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)

lib/vty.c
mgmtd/mgmt_txn.c

index 1c9cff478dd3fb533dac7a0304fd6de6a63aa449..22858b937f5bedb28e4914371789eb0247df29d1 100644 (file)
--- 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;
index c1cb33f6f3a47717cbce1f984ad9f1917a62cf5a..f0f6844d5f7fecf860a57785a486f4140fb636d5 100644 (file)
@@ -919,8 +919,8 @@ static int mgmt_txn_create_config_batches(struct mgmt_txn_req *txn_req,
                }
 
                if (!chg_clients)
-                       __log_err("No connected daemon is interested in XPATH %s",
-                                 xpath);
+                       __dbg("Daemons interested in XPATH are not currently connected: %s",
+                             xpath);
 
                cmtcfg_req->clients |= chg_clients;
 
@@ -931,7 +931,7 @@ static int mgmt_txn_create_config_batches(struct mgmt_txn_req *txn_req,
        if (!num_chgs) {
                (void)mgmt_txn_send_commit_cfg_reply(txn_req->txn,
                                                     MGMTD_NO_CFG_CHANGES,
-                                                    "No changes found to commit!");
+                                                    "No connected daemons interested in changes");
                return -1;
        }