Fix logging
This commit is contained in:
parent
2563c5d5b6
commit
bac7ffb13f
1 changed files with 6 additions and 2 deletions
|
@ -13,8 +13,6 @@ log = logging.getLogger("jimmy")
|
||||||
CONFIG.setdefault("logging", {})
|
CONFIG.setdefault("logging", {})
|
||||||
|
|
||||||
logging.basicConfig(
|
logging.basicConfig(
|
||||||
filename=CONFIG["logging"].get("file", "jimmy.log"),
|
|
||||||
filemode="a",
|
|
||||||
format="%(asctime)s %(levelname)s %(name)s %(message)s",
|
format="%(asctime)s %(levelname)s %(name)s %(message)s",
|
||||||
datefmt="%Y-%m-%d %H:%M:%S",
|
datefmt="%Y-%m-%d %H:%M:%S",
|
||||||
level=CONFIG["logging"].get("level", "INFO"),
|
level=CONFIG["logging"].get("level", "INFO"),
|
||||||
|
@ -25,6 +23,12 @@ logging.basicConfig(
|
||||||
show_path=False,
|
show_path=False,
|
||||||
markup=True
|
markup=True
|
||||||
),
|
),
|
||||||
|
FileHandler(
|
||||||
|
filename=CONFIG["logging"].get("file", "jimmy.log"),
|
||||||
|
mode="a",
|
||||||
|
encoding="utf-8",
|
||||||
|
errors="replace"
|
||||||
|
)
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
for logger in CONFIG["logging"].get("suppress", []):
|
for logger in CONFIG["logging"].get("suppress", []):
|
||||||
|
|
Loading…
Reference in a new issue