aboutsummaryrefslogtreecommitdiffstats
path: root/bot/__init__.py
diff options
context:
space:
mode:
authorGravatar RohanRadia <[email protected]>2019-10-02 20:58:00 +0100
committerGravatar GitHub <[email protected]>2019-10-02 20:58:00 +0100
commit1da22f8a9bd64f13883a4bc8011c9f5069b4dac9 (patch)
treedeaed1b2caf7f650f05e12613cdff5b8a12629c9 /bot/__init__.py
parentRemoved unused json (diff)
parentMerge pull request #285 from Numerlor/hacktober-date-channel-fixes (diff)
Merge pull request #3 from python-discord/master
Update
Diffstat (limited to 'bot/__init__.py')
-rw-r--r--bot/__init__.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/bot/__init__.py b/bot/__init__.py
index 7c564178..4729e50c 100644
--- a/bot/__init__.py
+++ b/bot/__init__.py
@@ -13,14 +13,13 @@ logging.TRACE = 5
logging.addLevelName(logging.TRACE, "TRACE")
-def monkeypatch_trace(self, msg, *args, **kwargs):
+def monkeypatch_trace(self: logging.Logger, msg: str, *args, **kwargs) -> None:
"""
Log 'msg % args' with severity 'TRACE'.
To pass exception information, use the keyword argument exc_info with a true value, e.g.
logger.trace("Houston, we have an %s", "interesting problem", exc_info=1)
"""
-
if self.isEnabledFor(logging.TRACE):
self._log(logging.TRACE, msg, args, **kwargs)
@@ -31,7 +30,7 @@ logging.Logger.trace = monkeypatch_trace
start_time = arrow.utcnow()
# Set up file logging
-log_dir = Path("bot", "log")
+log_dir = Path("bot/log")
log_file = log_dir / "hackbot.log"
os.makedirs(log_dir, exist_ok=True)