diff options
author | 2018-10-12 01:01:59 +0200 | |
---|---|---|
committer | 2018-10-12 01:01:59 +0200 | |
commit | 9567aec0929ade42e57e677b66da942abc51e59a (patch) | |
tree | 5e50a833b796d88fac05714e7721d8eb4f064a65 /bot/__init__.py | |
parent | Merging in master (diff) |
The app was logging to the wrong directory. This is now fixed. Also silenced websockets logging
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( |