30 lines
654 B
Python
30 lines
654 B
Python
import logging
|
|
import logging.config
|
|
import yaml
|
|
from os import path, makedirs, getcwd
|
|
|
|
if not path.exists("geruecht/log/debug"):
|
|
a = path.join(path.curdir, "geruecht", "log", "debug")
|
|
makedirs(a)
|
|
|
|
if not path.exists("geruecht/log/info"):
|
|
b = path.join(path.curdir, "geruecht", "log", "info")
|
|
makedirs(b)
|
|
|
|
|
|
with open("geruecht/logging.yml", 'rb') as file:
|
|
config = yaml.safe_load(file.read())
|
|
logging.config.dictConfig(config)
|
|
|
|
|
|
def getDebugLogger():
|
|
return logging.getLogger("debug_logger")
|
|
|
|
|
|
def getCreditLogger():
|
|
return logging.getLogger("credit_logger")
|
|
|
|
|
|
def getJobsLogger():
|
|
return logging.getLogger("jobs_logger")
|