diff --git a/lib/include/srslte/common/logmap.h b/lib/include/srslte/common/logmap.h index 601ed9f5b..0d3a87206 100644 --- a/lib/include/srslte/common/logmap.h +++ b/lib/include/srslte/common/logmap.h @@ -21,6 +21,8 @@ #include "logger.h" #include "singleton.h" +#include "srslte/common/log_filter.h" +#include "srslte/common/logger_stdout.h" #include #include diff --git a/srsue/src/main.cc b/srsue/src/main.cc index 2712856fb..b4beca6ee 100644 --- a/srsue/src/main.cc +++ b/srsue/src/main.cc @@ -33,6 +33,7 @@ #include "srslte/common/config_file.h" #include "srslte/common/crash_handler.h" +#include "srslte/common/logmap.h" #include "srslte/common/metrics_hub.h" #include "srslte/srslte.h" #include "srslte/version.h" @@ -571,6 +572,7 @@ int main(int argc, char* argv[]) logger_file.init(args.log.filename, args.log.file_max_size); logger = &logger_file; } + srslte::logmap::get_instance()->set_default_logger(logger); // Create UE instance srsue::ue ue; diff --git a/srsue/src/stack/ue_stack_lte.cc b/srsue/src/stack/ue_stack_lte.cc index a6fca6c71..dcf3e5e00 100644 --- a/srsue/src/stack/ue_stack_lte.cc +++ b/srsue/src/stack/ue_stack_lte.cc @@ -83,7 +83,6 @@ int ue_stack_lte::init(const stack_args_t& args_, srslte::logger* logger_) logger = logger_; // setup logging for each layer - logmap::get_instance()->set_default_logger(logger); mac_log.init("MAC ", logger, true); rlc_log.init("RLC ", logger); pdcp_log.init("PDCP", logger); diff --git a/srsue/test/ttcn3/hdr/dut_utils.h b/srsue/test/ttcn3/hdr/dut_utils.h index eb7d3d7c0..d70a07559 100644 --- a/srsue/test/ttcn3/hdr/dut_utils.h +++ b/srsue/test/ttcn3/hdr/dut_utils.h @@ -51,7 +51,7 @@ std::string get_filename_with_tc_name(const std::string& str, const uint32_t run result.push_back(start); // prepend TC name to last element (the actual filename) - stringstream filename_ss; + std::stringstream filename_ss; filename_ss << tc_name << "_" << "run" << run_id << "_" << result.back(); diff --git a/srsue/test/ttcn3/src/ttcn3_dut.cc b/srsue/test/ttcn3/src/ttcn3_dut.cc index e05ae522d..a84547281 100644 --- a/srsue/test/ttcn3/src/ttcn3_dut.cc +++ b/srsue/test/ttcn3/src/ttcn3_dut.cc @@ -22,18 +22,13 @@ #include "rapidjson/document.h" // rapidjson's DOM-style API #include "rapidjson/prettywriter.h" // for stringify JSON #include "srslte/build_info.h" -#include "srslte/common/log_filter.h" -#include "srslte/common/logger_stdout.h" +#include "srslte/common/logmap.h" #include "srsue/hdr/ue.h" -#include "ttcn3_helpers.h" #include "ttcn3_syssim.h" -#include #include #include #include -#include #include -#include using namespace srslte; using namespace srsue; @@ -138,6 +133,7 @@ int main(int argc, char** argv) // Instantiate file logger srslte::logger_file logger_file; + srslte::logmap::get_instance()->set_default_logger(&logger_file); // create and init SYSSIM ttcn3_syssim syssim(&logger_file);