Commit 8751fb64 authored by Jonathan Schaeffer's avatar Jonathan Schaeffer
Browse files

Config : chemin absolu ou relatif

parent 4bea3a58
......@@ -96,17 +96,15 @@ def main():
validate_config(cfg)
# At this point we ensure that configuration is sane.
# TODO : logger_file peut être relatif ou absolu
logger_file = cfg['logger_file']
if not logger_file.startswith('/'):
logger_file = os.path.dirname(os.path.realpath(args.config.name))+'/'+logger_file
logging.config.fileConfig(cfg["logger_file"])
logging.config.fileConfig(logger_file)
logger = logging.getLogger("resif_data_reporter")
logger.info("Starting")
statistics = []
use_cache = False
# TODO : utiliser un cache par volume configuré
# ça permettrait de lancer plusieurs fois l'application dans la même journée
# Refresh or use cache ?
# Try to open data.yaml
cache_file = cfg['cache_file']
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment