File size: 298 Bytes
ad87194 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
import logging.config
import yaml
import os
if os.path.exists("logs"):
pass
else:
os.makedirs("logs")
log_config_path = os.path.join(os.getcwd(), "logging_config.yaml")
with open(log_config_path, 'r') as file:
config = yaml.safe_load(file.read())
logging.config.dictConfig(config)
|