diff options
| author | 2018-09-27 11:07:29 +0100 | |
|---|---|---|
| committer | 2018-09-27 11:07:29 +0100 | |
| commit | af2b34b92b30aa5a51d385e6137f0716dd7a7935 (patch) | |
| tree | a96f5ab92678ebad022b53fd5fac0b068db1f009 /src/Logging.py | |
| parent | Fix 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.py | 4 |
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) |
