@@ -38,23 +38,26 @@ static void configure_cli11_log_args(CLI::App& app, log_appconfig& log_params)
3838 };
3939
4040 app.add_option (" --filename" , log_params.filename , " Log file output path" )->capture_default_str ();
41- app.add_option (" --all_level" , log_params.all_level , " Log level of all loggers" )
41+ app.add_option (
42+ " --all_level" , log_params.all_level , " Default log level for PHY, MAC, RLC, PDCP, RRC, SDAP, NGAP and GTPU" )
4243 ->capture_default_str ()
4344 ->check (level_check);
44- app.add_option (" --app_level" , log_params.app_level , " Generic log level" )->capture_default_str ()->check (level_check);
45- app.add_option (" --du_level" , log_params.du_level , " Log level for the DU" )->capture_default_str ()->check (level_check);
46- app.add_option (" --cu_level" , log_params.cu_level , " Log level for the CU" )->capture_default_str ()->check (level_check);
4745 app.add_option (" --phy_level" , log_params.phy_level , " PHY log level" )->capture_default_str ()->check (level_check);
48- app.add_option (" --radio_level" , log_params.radio_level , " Radio log level" )->capture_default_str ()->check (level_check);
4946 app.add_option (" --mac_level" , log_params.mac_level , " MAC log level" )->capture_default_str ()->check (level_check);
5047 app.add_option (" --rlc_level" , log_params.rlc_level , " RLC log level" )->capture_default_str ()->check (level_check);
51- app.add_option (" --f1u_level" , log_params.f1u_level , " F1-U log level" )->capture_default_str ()->check (level_check);
5248 app.add_option (" --pdcp_level" , log_params.pdcp_level , " PDCP log level" )->capture_default_str ()->check (level_check);
5349 app.add_option (" --rrc_level" , log_params.rrc_level , " RRC log level" )->capture_default_str ()->check (level_check);
5450 app.add_option (" --sdap_level" , log_params.sdap_level , " SDAP log level" )->capture_default_str ()->check (level_check);
51+ app.add_option (" --ngap_level" , log_params.ngap_level , " NGAP log level" )->capture_default_str ()->check (level_check);
5552 app.add_option (" --gtpu_level" , log_params.gtpu_level , " GTPU log level" )->capture_default_str ()->check (level_check);
53+ app.add_option (" --radio_level" , log_params.radio_level , " Radio log level" )->capture_default_str ()->check (level_check);
5654 app.add_option (" --fapi_level" , log_params.fapi_level , " FAPI log level" )->capture_default_str ()->check (level_check);
57- app.add_option (" --hex_max_size" , log_params.hex_max_size , " Maximum number of bytes to print in hex" )
55+ app.add_option (" --f1u_level" , log_params.f1u_level , " F1-U log level" )->capture_default_str ()->check (level_check);
56+ app.add_option (" --du_level" , log_params.du_level , " Log level for the DU" )->capture_default_str ()->check (level_check);
57+ app.add_option (" --cu_level" , log_params.cu_level , " Log level for the CU" )->capture_default_str ()->check (level_check);
58+ app.add_option (" --lib_level" , log_params.lib_level , " Generic log level" )->capture_default_str ()->check (level_check);
59+ app.add_option (
60+ " --hex_max_size" , log_params.hex_max_size , " Maximum number of bytes to print in hex (zero for no hex dumps)" )
5861 ->capture_default_str ()
5962 ->check (CLI::Range (0 , 1024 ));
6063 app.add_option (" --broadcast_enabled" ,
@@ -68,30 +71,15 @@ static void configure_cli11_log_args(CLI::App& app, log_appconfig& log_params)
6871
6972 // Post-parsing callback. This allows us to set the log level to "all" level, if no level is provided.
7073 app.callback ([&]() {
71- if (app.count (" --app_level" ) == 0 ) {
72- log_params.app_level = log_params.all_level ;
73- }
74- if (app.count (" --du_level" ) == 0 ) {
75- log_params.du_level = log_params.all_level ;
76- }
77- if (app.count (" --cu_level" ) == 0 ) {
78- log_params.cu_level = log_params.all_level ;
79- }
8074 if (app.count (" --phy_level" ) == 0 ) {
8175 log_params.phy_level = log_params.all_level ;
8276 }
83- if (app.count (" --radio_level" ) == 0 ) {
84- log_params.radio_level = log_params.all_level ;
85- }
8677 if (app.count (" --mac_level" ) == 0 ) {
8778 log_params.mac_level = log_params.all_level ;
8879 }
8980 if (app.count (" --rlc_level" ) == 0 ) {
9081 log_params.rlc_level = log_params.all_level ;
9182 }
92- if (app.count (" --f1u_level" ) == 0 ) {
93- log_params.f1u_level = log_params.all_level ;
94- }
9583 if (app.count (" --pdcp_level" ) == 0 ) {
9684 log_params.pdcp_level = log_params.all_level ;
9785 }
@@ -101,10 +89,10 @@ static void configure_cli11_log_args(CLI::App& app, log_appconfig& log_params)
10189 if (app.count (" --sdap_level" ) == 0 ) {
10290 log_params.sdap_level = log_params.all_level ;
10391 }
104- if (app.count (" --gtpu_level " ) == 0 ) {
105- log_params.gtpu_level = log_params.all_level ;
92+ if (app.count (" --ngap_level " ) == 0 ) {
93+ log_params.ngap_level = log_params.all_level ;
10694 }
107- if (app.count (" --fapi_level " ) == 0 ) {
95+ if (app.count (" --gtpu_level " ) == 0 ) {
10896 log_params.gtpu_level = log_params.all_level ;
10997 }
11098 });
0 commit comments