resa-padel/resa_padel/config.py

13 lines
315 B
Python

import logging.config
import os
import yaml
def init_log_config():
root_dir = os.path.realpath(os.path.dirname(__file__))
logging_file = root_dir + "/logging.yaml"
with open(logging_file, "r") as f:
logging_config = yaml.safe_load(f.read())
logging.config.dictConfig(logging_config)