diff options
Diffstat (limited to 'bot/__init__.py')
-rw-r--r-- | bot/__init__.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/bot/__init__.py b/bot/__init__.py index c2ea4ba0..c411deb6 100644 --- a/bot/__init__.py +++ b/bot/__init__.py @@ -1,10 +1,11 @@ import logging.handlers import os +from pathlib import Path # set up logging -log_dir = 'log' -log_file = log_dir + os.sep + 'hackbot.log' +log_dir = Path("bot", "log") +log_file = log_dir / "hackbot.log" os.makedirs(log_dir, exist_ok=True) # file handler sets up rotating logs every 5 MB @@ -24,6 +25,7 @@ if root.handlers: # Silence irrelevant loggers logging.getLogger("discord").setLevel(logging.ERROR) +logging.getLogger("websockets").setLevel(logging.ERROR) # setup new logging configuration logging.basicConfig( |