fix
This commit is contained in:
parent
6ca7ce1992
commit
a010cacd9f
@ -75,6 +75,8 @@ class pathStr:
|
|||||||
return week
|
return week
|
||||||
|
|
||||||
class ComicPath:
|
class ComicPath:
|
||||||
|
WORK_PATH = os.path.abspath(os.curdir)
|
||||||
|
LOG_CONF_PATH = os.path.join(WORK_PATH,"logconf.yml")
|
||||||
COMIC_ICON_NAME = "000"
|
COMIC_ICON_NAME = "000"
|
||||||
COMIC_ICON_SUFFIX = "jpg"
|
COMIC_ICON_SUFFIX = "jpg"
|
||||||
COMIC_ICON_FILE_NAME = COMIC_ICON_NAME+"."+COMIC_ICON_SUFFIX
|
COMIC_ICON_FILE_NAME = COMIC_ICON_NAME+"."+COMIC_ICON_SUFFIX
|
||||||
|
|||||||
@ -2,9 +2,10 @@
|
|||||||
import logging
|
import logging
|
||||||
import logging.config
|
import logging.config
|
||||||
import yaml
|
import yaml
|
||||||
|
from common.Constant import ComicPath
|
||||||
|
|
||||||
class logger:
|
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)
|
dict_conf = yaml.safe_load(f)
|
||||||
logging.config.dictConfig(dict_conf)
|
logging.config.dictConfig(dict_conf)
|
||||||
root = logging.getLogger()
|
root = logging.getLogger()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user