From 6a2d867a47b71cf8fbd05e8b9a424c9a7142191e Mon Sep 17 00:00:00 2001 From: Etzelia Date: Wed, 12 Sep 2018 12:31:20 -0500 Subject: [PATCH] Updated log to use an absolute path. --- geoffrey/bot.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/geoffrey/bot.py b/geoffrey/bot.py index 82a1407..00b86c8 100644 --- a/geoffrey/bot.py +++ b/geoffrey/bot.py @@ -154,8 +154,8 @@ def setup_logging(config): bot_info_logger = logging.getLogger('geoffrey.bot') bot_info_logger.setLevel(logging.INFO) - handler = handlers.TimedRotatingFileHandler(filename='Geoffrey.log', when='D', - interval=config.rotation_duration, backupCount=config.count, + handler = handlers.TimedRotatingFileHandler(filename="{}/Geoffrey.log".format(path.dirname(path.abspath(__file__))), + when='D', interval=config.rotation_duration, backupCount=config.count, encoding='utf-8') handler.setFormatter(logging.Formatter('%(asctime)s:%(levelname)s:%(name)s: %(message)s'))