From 1ab927ebc121771cf840ea1809c98c46b47b4340 Mon Sep 17 00:00:00 2001 From: jlaura <jlaura@asu.edu> Date: Tue, 19 Jul 2016 15:34:25 -0700 Subject: [PATCH] Logging needs to default to an example that we already have. --- plio/utils/log.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/plio/utils/log.py b/plio/utils/log.py index 1ef3cfa..0f8a2de 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()) -- GitLab