aboutsummaryrefslogtreecommitdiff
path: root/src/Logging.py
diff options
context:
space:
mode:
authorGravatar jesopo2018-09-27 11:07:29 +0100
committerGravatar jesopo2018-09-27 11:07:29 +0100
commitaf2b34b92b30aa5a51d385e6137f0716dd7a7935 (patch)
treea96f5ab92678ebad022b53fd5fac0b068db1f009 /src/Logging.py
parentFix event typo in greeting.py ("recevied" -> "received") (diff)
signature
Don't give IRCBot instance to things that don't need it, use a better way of
doing default locations for config/database/log
Diffstat (limited to 'src/Logging.py')
-rw-r--r--src/Logging.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Logging.py b/src/Logging.py
index 3f5815d6..e08160f4 100644
--- a/src/Logging.py
+++ b/src/Logging.py
@@ -14,7 +14,7 @@ class BitBotFormatter(logging.Formatter):
return s
class Log(object):
- def __init__(self, bot, directory, filename):
+ def __init__(self, location):
self.logger = logging.getLogger(__name__)
self.logger.setLevel(logging.DEBUG)
@@ -29,7 +29,7 @@ class Log(object):
self.logger.addHandler(stdout_handler)
file_handler = logging.handlers.TimedRotatingFileHandler(
- os.path.join(directory, filename), when="midnight", backupCount=5)
+ location, when="midnight", backupCount=5)
file_handler.setLevel(logging.DEBUG)
file_handler.setFormatter(formatter)
self.logger.addHandler(file_handler)