sta_connect2.py : added set log_level to arguments

Signed-off-by: Chuck SmileyRekiere <chuck.smileyrekiere@candelatech.com>
This commit is contained in:
Chuck SmileyRekiere
2022-06-01 07:52:15 -06:00
committed by shivam
parent 780df3f4d5
commit c12be1e4bf

View File

@@ -903,6 +903,9 @@ CLI Example for kpi.csv, variable tx/rx rates, and pdu size:
help="--csv_outfile <Output file for csv data>",
default="")
# logging configuration:
parser.add_argument('--log_level', default=None,
help='Set logging level: debug | info | warning | error | critical')
parser.add_argument("--lf_logger_config_json",
help="--lf_logger_config_json <json file> , json configuration of logger")
@@ -911,8 +914,9 @@ CLI Example for kpi.csv, variable tx/rx rates, and pdu size:
# set up logger
logger_config = lf_logger_config.lf_logger_config()
if args.debug:
logger_config.set_level("debug")
# set the logger level to debug
if args.log_level:
logger_config.set_level(level=args.log_level)
# lf_logger_config_json will take presidence to changing debug levels
if args.lf_logger_config_json: