Skip to content

Commit

Permalink
increase log size and backup count
Browse files Browse the repository at this point in the history
  • Loading branch information
bobokun committed Jun 6, 2023
1 parent 0a85c8c commit 148a1a2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.0.0-develop19
4.0.0-develop20
2 changes: 0 additions & 2 deletions modules/core/share_limits.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,6 @@ def update_share_limits_for_group(self, group_name, group_config, torrents):
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"]:
Expand Down
6 changes: 3 additions & 3 deletions modules/logs.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ def clear_errors(self):
"""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):
Expand All @@ -88,7 +88,7 @@ def _formatter(self, handler=None, border=True, log_only=False, space=False):

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)

Expand Down

0 comments on commit 148a1a2

Please sign in to comment.