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

@@ -88,6 +88,12 @@ class lf_logger_config:
logging.propagate = False
print(logging.propagate)
def set_json(self, json_file):
if json_file:
# logger_config.lf_logger_config_json = "lf_logger_config.json"
self.lf_logger_config_json = args.lf_logger_config_json
self.load_lf_logger_config()
def set_level(self, level):
if not level:
return # no change from defaults