From 8e38ef2ee4028c4395f91d4c36e05267271e2264 Mon Sep 17 00:00:00 2001 From: Andre Puschmann Date: Thu, 7 Mar 2019 21:25:10 +0100 Subject: [PATCH] print PDU length when logging RRC message --- srsenb/src/upper/rrc.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/srsenb/src/upper/rrc.cc b/srsenb/src/upper/rrc.cc index 5472d4479..177e2fd1a 100644 --- a/srsenb/src/upper/rrc.cc +++ b/srsenb/src/upper/rrc.cc @@ -165,12 +165,13 @@ void rrc::log_rrc_message(const std::string& source, const direction_t dir, cons const T& msg) { if (rrc_log->get_level() == srslte::LOG_LEVEL_INFO) { - rrc_log->info("%s - %s %s\n", source.c_str(), dir == Tx ? "Tx" : "Rx", msg.msg.c1().type().to_string().c_str()); + rrc_log->info("%s - %s %s (%d B)\n", source.c_str(), dir == Tx ? "Tx" : "Rx", + msg.msg.c1().type().to_string().c_str(), pdu->N_bytes); } else if (rrc_log->get_level() >= srslte::LOG_LEVEL_DEBUG) { asn1::json_writer json_writer; msg.to_json(json_writer); - rrc_log->debug_hex(pdu->msg, pdu->N_bytes, "%s - %s %s\n", source.c_str(), dir == Tx ? "Tx" : "Rx", - msg.msg.c1().type().to_string().c_str()); + rrc_log->debug_hex(pdu->msg, pdu->N_bytes, "%s - %s %s (%d B)\n", source.c_str(), dir == Tx ? "Tx" : "Rx", + msg.msg.c1().type().to_string().c_str(), pdu->N_bytes); rrc_log->debug("Content:\n%s\n", json_writer.to_string().c_str()); } }