From 9d8d897d3ea6e6a136a55a71b085ab42982b9f6d Mon Sep 17 00:00:00 2001 From: Andre Puschmann Date: Mon, 22 Mar 2021 19:04:22 +0100 Subject: [PATCH] mac_pcap_base: log warning when PDUs can't be added to write queue --- lib/src/common/mac_pcap_base.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/src/common/mac_pcap_base.cc b/lib/src/common/mac_pcap_base.cc index 03426e0e1..b992efee3 100644 --- a/lib/src/common/mac_pcap_base.cc +++ b/lib/src/common/mac_pcap_base.cc @@ -85,10 +85,10 @@ void mac_pcap_base::pack_and_queue(uint8_t* payload, memcpy(pdu.pdu->msg, payload, payload_len); pdu.pdu->N_bytes = payload_len; if (not queue.try_push(std::move(pdu))) { - logger.error("Failed to push message to pcap writer queue"); + logger.warning("Dropping PDU (%d B) in PCAP. Write queue full.", payload_len); } } else { - logger.info("Dropping PDU in PCAP. No buffer available or not enough space (pdu_len=%d).", payload_len); + logger.warning("Dropping PDU in PCAP. No buffer available or not enough space (pdu_len=%d).", payload_len); } } } @@ -122,10 +122,10 @@ void mac_pcap_base::pack_and_queue_nr(uint8_t* payload, memcpy(pdu.pdu->msg, payload, payload_len); pdu.pdu->N_bytes = payload_len; if (not queue.try_push(std::move(pdu))) { - logger.error("Failed to push message to pcap writer queue"); + logger.warning("Dropping PDU (%d B) in NR PCAP. Write queue full.", payload_len); } } else { - logger.info("Dropping PDU in NR PCAP. No buffer available or not enough space (pdu_len=%d).", payload_len); + logger.warning("Dropping PDU in NR PCAP. No buffer available or not enough space (pdu_len=%d).", payload_len); } } }