increase log size and backup count

This commit is contained in:
bobokun 2023-06-05 22:38:05 -04:00
parent 0a85c8c5d4
commit 148a1a2176
No known key found for this signature in database
GPG key ID: B73932169607D927
3 changed files with 4 additions and 6 deletions

View file

@ -1 +1 @@
4.0.0-develop19
4.0.0-develop20

View file

@ -202,8 +202,6 @@ class ShareLimits:
self.tag_and_update_share_limits_for_torrent(torrent, group_config)
self.stats_tagged += 1
self.torrents_updated.append(t_name)
else:
self.share_limits_config[group_name]["torrents"].remove(torrent)
# Cleanup torrents if the torrent meets the criteria for deletion and cleanup is enabled
if group_config["cleanup"]:

View file

@ -68,9 +68,9 @@ class MyLogger:
"""Clear saved errors"""
self.saved_errors = []
def _get_handler(self, log_file, count=3):
def _get_handler(self, log_file, count=5):
"""Get handler for log file"""
max_bytes = 1024 * 1024 * 2
max_bytes = 1024 * 1024 * 10
_handler = RotatingFileHandler(log_file, delay=True, mode="w", maxBytes=max_bytes, backupCount=count, encoding="utf-8")
self._formatter(handler=_handler)
# if os.path.isfile(log_file):
@ -88,7 +88,7 @@ class MyLogger:
def add_main_handler(self):
"""Add main handler to logger"""
self.main_handler = self._get_handler(self.main_log, count=9)
self.main_handler = self._get_handler(self.main_log, count=19)
self.main_handler.addFilter(fmt_filter)
self._logger.addHandler(self.main_handler)