This commit is contained in:
cwx
2023-04-06 15:46:53 +08:00
parent 6ca7ce1992
commit a010cacd9f
2 changed files with 4 additions and 1 deletions
+2 -1
View File
@@ -2,9 +2,10 @@
import logging
import logging.config
import yaml
from common.Constant import ComicPath
class logger:
with open("logconf.yml", "r",encoding="utf-8") as f:
with open(ComicPath.LOG_CONF_PATH, "r",encoding="utf-8") as f:
dict_conf = yaml.safe_load(f)
logging.config.dictConfig(dict_conf)
root = logging.getLogger()