commit
6b8e3aeb0d
|
@ -154,8 +154,8 @@ def setup_logging(config):
|
||||||
bot_info_logger = logging.getLogger('geoffrey.bot')
|
bot_info_logger = logging.getLogger('geoffrey.bot')
|
||||||
bot_info_logger.setLevel(logging.INFO)
|
bot_info_logger.setLevel(logging.INFO)
|
||||||
|
|
||||||
handler = handlers.TimedRotatingFileHandler(filename='Geoffrey.log', when='D',
|
handler = handlers.TimedRotatingFileHandler(filename="{}/Geoffrey.log".format(path.dirname(path.abspath(__file__))),
|
||||||
interval=config.rotation_duration, backupCount=config.count,
|
when='D', interval=config.rotation_duration, backupCount=config.count,
|
||||||
encoding='utf-8')
|
encoding='utf-8')
|
||||||
|
|
||||||
handler.setFormatter(logging.Formatter('%(asctime)s:%(levelname)s:%(name)s: %(message)s'))
|
handler.setFormatter(logging.Formatter('%(asctime)s:%(levelname)s:%(name)s: %(message)s'))
|
||||||
|
|
Loading…
Reference in New Issue