|
53 | 53 |
|
54 | 54 | // Include ThreadSanitizer (TSAN) options if thread sanitization is enabled. |
55 | 55 | // This include is not unused - it helps prevent false alarms from the thread sanitizer. |
| 56 | +#include "du_appconfig_yaml_writer.h" |
| 57 | + |
56 | 58 | #include "srsran/support/tsan_options.h" |
57 | 59 |
|
58 | 60 | #include <atomic> |
|
66 | 68 | #include "apps/units/flexible_du/du_high/pcap_factory.h" |
67 | 69 | #include "apps/units/flexible_du/split_dynamic/dynamic_du_unit_cli11_schema.h" |
68 | 70 | #include "apps/units/flexible_du/split_dynamic/dynamic_du_unit_config_validator.h" |
| 71 | +#include "apps/units/flexible_du/split_dynamic/dynamic_du_unit_config_yaml_writer.h" |
69 | 72 | #include "apps/units/flexible_du/split_dynamic/dynamic_du_unit_logger_registrator.h" |
70 | 73 |
|
71 | 74 | #ifdef DPDK_FOUND |
@@ -123,12 +126,18 @@ static void initialize_log(const std::string& filename) |
123 | 126 | static void register_app_logs(const logger_appconfig& log_cfg, const dynamic_du_unit_config& du_loggers) |
124 | 127 | { |
125 | 128 | // Set log-level of app and all non-layer specific components to app level. |
126 | | - for (const auto& id : {"GNB", "ALL", "SCTP-GW", "IO-EPOLL", "UDP-GW", "PCAP"}) { |
| 129 | + for (const auto& id : {"ALL", "SCTP-GW", "IO-EPOLL", "UDP-GW", "PCAP"}) { |
127 | 130 | auto& logger = srslog::fetch_basic_logger(id, false); |
128 | 131 | logger.set_level(log_cfg.lib_level); |
129 | 132 | logger.set_hex_dump_max_size(log_cfg.hex_max_size); |
130 | 133 | } |
131 | 134 |
|
| 135 | + auto& app_logger = srslog::fetch_basic_logger("GNB", false); |
| 136 | + app_logger.set_level(srslog::basic_levels::info); |
| 137 | + app_services::application_message_banners::log_build_info(app_logger); |
| 138 | + app_logger.set_level(log_cfg.config_level); |
| 139 | + app_logger.set_hex_dump_max_size(log_cfg.hex_max_size); |
| 140 | + |
132 | 141 | auto& config_logger = srslog::fetch_basic_logger("CONFIG", false); |
133 | 142 | config_logger.set_level(log_cfg.config_level); |
134 | 143 | config_logger.set_hex_dump_max_size(log_cfg.hex_max_size); |
@@ -200,7 +209,10 @@ int main(int argc, char** argv) |
200 | 209 | // Log input configuration. |
201 | 210 | srslog::basic_logger& config_logger = srslog::fetch_basic_logger("CONFIG"); |
202 | 211 | if (config_logger.debug.enabled()) { |
203 | | - config_logger.debug("Input configuration (all values): \n{}", app.config_to_str(true, false)); |
| 212 | + YAML::Node node; |
| 213 | + fill_du_appconfig_in_yaml_schema(node, du_cfg); |
| 214 | + fill_dynamic_du_unit_config_in_yaml_schema(node, du_unit_cfg); |
| 215 | + config_logger.debug("Input configuration (all values): \n{}", YAML::Dump(node)); |
204 | 216 | } else { |
205 | 217 | config_logger.info("Input configuration (only non-default values): \n{}", app.config_to_str(false, false)); |
206 | 218 | } |
@@ -230,9 +242,6 @@ int main(int argc, char** argv) |
230 | 242 | // Setup size of byte buffer pool. |
231 | 243 | init_byte_buffer_segment_pool(du_cfg.buffer_pool_config.nof_segments, du_cfg.buffer_pool_config.segment_size); |
232 | 244 |
|
233 | | - // Log build info |
234 | | - du_logger.info("Built in {} mode using {}", get_build_mode(), get_build_info()); |
235 | | - |
236 | 245 | // Log CPU architecture. |
237 | 246 | cpu_architecture_info::get().print_cpu_info(du_logger); |
238 | 247 |
|
|
0 commit comments