diff --git a/plio/utils/log.py b/plio/utils/log.py index 1ef3cfabfde7f90fa54b2e0a915b2e20dc6a531d..0f8a2dec8b710ef70f5763be63061d0c0f7bea24 100644 --- a/plio/utils/log.py +++ b/plio/utils/log.py @@ -2,7 +2,10 @@ import os import json import logging.config -def setup_logging(default_path='logging.json', +from ..examples import get_path + + +def setup_logging(default_path=get_path('logging.json'), default_level='INFO', env_key='LOG_CFG'): """ @@ -28,7 +31,8 @@ def setup_logging(default_path='logging.json', logtype = os.path.splitext(os.path.basename(path))[1] with open(path, 'rt') as f: if logtype == '.json': - config = json.load(f) + config = json.load(f, parse_float=True, + parse_int=True) elif logtype == '.yaml': import yaml config = yaml.load(f.read())