flaschengeist/geruecht/logger.py

28 lines
604 B
Python
Raw Normal View History

import logging
import logging.config
import yaml
from os import path
if not path.exists("geruecht/log/debug"):
a = path.join(path.curdir, "geruecht", "log", "debug")
if not path.exists("geruecht/log/info"):
b = path.join(path.curdir, "geruecht", "log", "info")
with open("geruecht/logging.yml", 'rt') as file:
config = yaml.safe_load(file.read())
logging.config.dictConfig(config)
2020-03-09 18:54:51 +00:00
def getDebugLogger():
return logging.getLogger("debug_logger")
def getCreditLogger():
return logging.getLogger("credit_logger")
def getJobsLogger():
return logging.getLogger("jobs_logger")