logging: Add set_json logic to lf_logger_config

This will be common code, put it in the helper class.

Signed-off-by: Ben Greear <greearb@candelatech.com>
This commit is contained in:
Ben Greear
2022-01-29 16:35:06 -08:00
committed by shivam
parent 2f3eb58c41
commit d532d7f8bf
3 changed files with 10 additions and 4 deletions

View File

@@ -226,10 +226,9 @@ python3 ./test_generic.py
args = parser.parse_args()
logger_config = lf_logger_config.lf_logger_config()
if args.lf_logger_config_json:
# logger_config.lf_logger_config_json = "lf_logger_config.json"
logger_config.lf_logger_config_json = args.lf_logger_config_json
logger_config.load_lf_logger_config()
# set the logger level to requested value
logger_config.set_level(level=args.log_level)
logger_config.set_json(json_file=args.lf_logger_config_json)
num_sta = 2
if (args.num_stations is not None) and (int(args.num_stations) > 0):