You mean, like this?
import logging.config import yaml with open(log_config_file) as f: logging.config.dictConfig(yaml.safe_load(f))
You mean, like this?
Because this is the correct way that allows the user to supply their own configuration that is not tied tightly to your little program.