2019-12-28 20:52:49 +00:00
|
|
|
import logging
|
2020-03-10 08:19:11 +00:00
|
|
|
import logging.config
|
|
|
|
import yaml
|
|
|
|
from os import path
|
2019-12-28 20:52:49 +00:00
|
|
|
|
2020-03-10 08:19:11 +00:00
|
|
|
if not path.exists("geruecht/log/debug"):
|
|
|
|
a = path.join(path.curdir ,"geruecht", "log", "debug")
|
2019-12-28 20:52:49 +00:00
|
|
|
|
2020-03-10 08:19:11 +00:00
|
|
|
if not path.exists("geruecht/log/info"):
|
|
|
|
b = path.join(path.curdir, "geruecht", "log", "info")
|
2019-12-28 20:52:49 +00:00
|
|
|
|
|
|
|
|
2020-03-10 08:19:11 +00:00
|
|
|
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
|
|
|
|
2020-03-10 08:19:11 +00:00
|
|
|
def getDebugLogger():
|
|
|
|
return logging.getLogger("debug_logger")
|
2019-12-28 20:52:49 +00:00
|
|
|
|
2020-03-10 08:19:11 +00:00
|
|
|
def getCreditLogger():
|
|
|
|
return logging.getLogger("credit_logger")
|
2019-12-28 20:52:49 +00:00
|
|
|
|
2020-03-10 08:19:11 +00:00
|
|
|
def getJobsLogger():
|
|
|
|
return logging.getLogger("jobs_logger")
|