diff --git a/lib/src/phy/ue/ue_dl.c b/lib/src/phy/ue/ue_dl.c index bd6abb067..e5d9562d8 100644 --- a/lib/src/phy/ue/ue_dl.c +++ b/lib/src/phy/ue/ue_dl.c @@ -1423,9 +1423,11 @@ int srslte_ue_dl_find_and_decode(srslte_ue_dl_t* q, if (ret == 1) { // Logging - char str[512]; - srslte_dci_dl_info(&dci_dl, str, 512); - INFO("PDCCH: %s, snr=%.1f dB\n", str, q->chest_res.snr_db); + if (SRSLTE_DEBUG_ENABLED && srslte_verbose >= SRSLTE_VERBOSE_INFO) { + char str[512]; + srslte_dci_dl_info(&dci_dl, str, 512); + INFO("PDCCH: %s, snr=%.1f dB\n", str, q->chest_res.snr_db); + } // Force known MBSFN grant if (sf->sf_type == SRSLTE_SF_MBSFN) { diff --git a/srsenb/src/phy/cc_worker.cc b/srsenb/src/phy/cc_worker.cc index 3d6454851..967afe3b4 100644 --- a/srsenb/src/phy/cc_worker.cc +++ b/srsenb/src/phy/cc_worker.cc @@ -438,9 +438,11 @@ int cc_worker::encode_pdcch_ul(stack_interface_phy_lte::ul_sched_grant_t* grants } // Logging - char str[512]; - srslte_dci_ul_info(&grants[i].dci, str, 512); - Info("PDCCH: cc=%d, %s, tti_tx_dl=%d\n", cc_idx, str, tti_tx_dl); + if (log_h->get_level() >= srslte::LOG_LEVEL_INFO) { + char str[512]; + srslte_dci_ul_info(&grants[i].dci, str, 512); + log_h->info("PDCCH: cc=%d, %s, tti_tx_dl=%d\n", cc_idx, str, tti_tx_dl); + } } } return SRSLTE_SUCCESS; @@ -456,7 +458,7 @@ int cc_worker::encode_pdcch_dl(stack_interface_phy_lte::dl_sched_grant_t* grants return SRSLTE_ERROR; } - if (LOG_THIS(rnti)) { + if (LOG_THIS(rnti) and log_h->get_level() >= srslte::LOG_LEVEL_INFO) { // Logging char str[512]; srslte_dci_dl_info(&grants[i].dci, str, 512); @@ -484,9 +486,11 @@ int cc_worker::encode_pmch(stack_interface_phy_lte::dl_sched_grant_t* grant, srs } // Logging - char str[512]; - srslte_pdsch_tx_info(&pmch_cfg.pdsch_cfg, str, 512); - Info("PMCH: %s\n", str); + if (log_h->get_level() >= srslte::LOG_LEVEL_INFO) { + char str[512]; + srslte_pdsch_tx_info(&pmch_cfg.pdsch_cfg, str, 512); + log_h->info("PMCH: %s\n", str); + } // Save metrics stats ue_db[SRSLTE_MRNTI]->metrics_dl(mbsfn_cfg->mbsfn_mcs); @@ -527,11 +531,11 @@ int cc_worker::encode_pdsch(stack_interface_phy_lte::dl_sched_grant_t* grants, u phy->ue_db.set_ack_pending(tti_tx_ul, cc_idx, grants[i].dci); } - if (LOG_THIS(rnti)) { + if (LOG_THIS(rnti) and log_h->get_level() >= srslte::LOG_LEVEL_INFO) { // Logging char str[512]; srslte_pdsch_tx_info(&dl_cfg.pdsch, str, 512); - Info("PDSCH: cc=%d, %s, tti_tx_dl=%d\n", cc_idx, str, tti_tx_dl); + log_h->info("PDSCH: cc=%d, %s, tti_tx_dl=%d\n", cc_idx, str, tti_tx_dl); } // Save metrics stats diff --git a/srsue/src/phy/cc_worker.cc b/srsue/src/phy/cc_worker.cc index 956ef6ea6..fb13abb3c 100644 --- a/srsue/src/phy/cc_worker.cc +++ b/srsue/src/phy/cc_worker.cc @@ -393,9 +393,11 @@ int cc_worker::decode_pdcch_dl() phy->set_dl_pending_grant(CURRENT_TTI, dci[k].cif_present ? dci[k].cif : cc_idx, cc_idx, &dci[k]); // Logging - char str[512] = {}; - srslte_dci_dl_info(&dci[k], str, 512); - Info("PDCCH: cc=%d, %s, snr=%.1f dB\n", cc_idx, str, ue_dl.chest_res.snr_db); + if (log_h->get_level() >= srslte::LOG_LEVEL_INFO) { + char str[512]; + srslte_dci_dl_info(&dci[k], str, 512); + log_h->info("PDCCH: cc=%d, %s, snr=%.1f dB\n", cc_idx, str, ue_dl.chest_res.snr_db); + } } } return nof_grants; @@ -462,9 +464,11 @@ int cc_worker::decode_pdsch(srslte_pdsch_ack_resource_t ack_resource, dl_metrics.turbo_iters = pdsch_dec->avg_iterations_block / 2; // Logging - char str[512] = {}; - srslte_pdsch_rx_info(&ue_dl_cfg.cfg.pdsch, pdsch_dec, str, 512); - Info("PDSCH: cc=%d, %s, snr=%.1f dB\n", cc_idx, str, ue_dl.chest_res.snr_db); + if (log_h->get_level() >= srslte::LOG_LEVEL_INFO) { + char str[512]; + srslte_pdsch_rx_info(&ue_dl_cfg.cfg.pdsch, pdsch_dec, str, 512); + log_h->info("PDSCH: cc=%d, %s, snr=%.1f dB\n", cc_idx, str, ue_dl.chest_res.snr_db); + } } return SRSLTE_SUCCESS; @@ -763,9 +767,11 @@ int cc_worker::decode_pdcch_ul() phy->set_ul_pending_grant(&sf_cfg_dl, cc_idx_grant, &dci[k]); // Logging - char str[512]; - srslte_dci_ul_info(&dci[k], str, 512); - Info("PDCCH: cc=%d, %s, snr=%.1f dB\n", cc_idx_grant, str, ue_dl.chest_res.snr_db); + if (log_h->get_level() >= srslte::LOG_LEVEL_INFO) { + char str[512]; + srslte_dci_ul_info(&dci[k], str, 512); + log_h->info("PDCCH: cc=%d, %s, snr=%.1f dB\n", cc_idx_grant, str, ue_dl.chest_res.snr_db); + } } } @@ -814,9 +820,11 @@ bool cc_worker::encode_uplink(mac_interface_phy_lte::tb_action_ul_t* action, srs } // Logging - char str[512]; - if (srslte_ue_ul_info(&ue_ul_cfg, &sf_cfg_ul, &data.uci, str, 512)) { - Info("%s\n", str); + if (log_h->get_level() >= srslte::LOG_LEVEL_INFO) { + char str[512]; + if (srslte_ue_ul_info(&ue_ul_cfg, &sf_cfg_ul, &data.uci, str, 512)) { + log_h->info("%s\n", str); + } } return ret > 0;