From c91264881ce0cbcb05653d1d92a39e3139b70d9d Mon Sep 17 00:00:00 2001 From: Alexander Sherikov Date: Wed, 27 Oct 2021 16:12:50 +0200 Subject: [PATCH] libmavconn: msg Error -> Inform for better control over output If the connection is lost, thousands error messages are printed which overflows the log file. Suggesting to avoid errors in this case when messages are dropped. Also std::length_error is meant that messages were not able to deliver. --- libmavconn/src/interface.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libmavconn/src/interface.cpp b/libmavconn/src/interface.cpp index b7cb0b240..7821a4595 100644 --- a/libmavconn/src/interface.cpp +++ b/libmavconn/src/interface.cpp @@ -150,7 +150,7 @@ void MAVConnInterface::send_message_ignore_drop(const mavlink::mavlink_message_t send_message(msg); } catch (std::length_error &e) { - CONSOLE_BRIDGE_logError(PFX "%zu: DROPPED Message-Id %u [%u bytes] IDs: %u.%u Seq: %u: %s", + CONSOLE_BRIDGE_logInform(PFX "%zu: DROPPED Message-Id %u [%u bytes] IDs: %u.%u Seq: %u: %s", conn_id, msg->msgid, msg->len, msg->sysid, msg->compid, msg->seq, e.what()); @@ -163,7 +163,7 @@ void MAVConnInterface::send_message_ignore_drop(const mavlink::Message &msg, uin send_message(msg, source_compid); } catch (std::length_error &e) { - CONSOLE_BRIDGE_logError(PFX "%zu: DROPPED Message %s: %s", + CONSOLE_BRIDGE_logInform(PFX "%zu: DROPPED Message %s: %s", conn_id, msg.get_name().c_str(), e.what());