Logger tweaks

Set encoding, decreased logfile max-size
This commit is contained in:
si0972 committed 2019-06-03 20:35:22 +02:00
1 parent a1de6f2986
commit 63061d4876
1 file changed
+1 -1
+1 -1
View File
@@ -25,7 +25,7 @@ class BotLogger(object):
if self.log_level:
print(os.path.abspath(self.log_location))
file_logger = logging.handlers.RotatingFileHandler(f'{self.log_location}/bot.log',
mode='a', maxBytes=50000, encoding=None, delay=0, backupCount=5)
mode='a', maxBytes=5000, encoding="UTF-8", delay=0, backupCount=5)
file_logger.setLevel(self.log_level)
file_logger.setFormatter(log_formatter)
self.bot_logger.addHandler(file_logger)