mirror of
https://github.com/StuffAnThings/qbit_manage.git
synced 2025-12-20 07:38:27 +08:00
increase log size and backup count
This commit is contained in:
parent
0a85c8c5d4
commit
148a1a2176
3 changed files with 4 additions and 6 deletions
2
VERSION
2
VERSION
|
|
@ -1 +1 @@
|
||||||
4.0.0-develop19
|
4.0.0-develop20
|
||||||
|
|
|
||||||
|
|
@ -202,8 +202,6 @@ class ShareLimits:
|
||||||
self.tag_and_update_share_limits_for_torrent(torrent, group_config)
|
self.tag_and_update_share_limits_for_torrent(torrent, group_config)
|
||||||
self.stats_tagged += 1
|
self.stats_tagged += 1
|
||||||
self.torrents_updated.append(t_name)
|
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
|
# Cleanup torrents if the torrent meets the criteria for deletion and cleanup is enabled
|
||||||
if group_config["cleanup"]:
|
if group_config["cleanup"]:
|
||||||
|
|
|
||||||
|
|
@ -68,9 +68,9 @@ class MyLogger:
|
||||||
"""Clear saved errors"""
|
"""Clear saved errors"""
|
||||||
self.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"""
|
"""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")
|
_handler = RotatingFileHandler(log_file, delay=True, mode="w", maxBytes=max_bytes, backupCount=count, encoding="utf-8")
|
||||||
self._formatter(handler=_handler)
|
self._formatter(handler=_handler)
|
||||||
# if os.path.isfile(log_file):
|
# if os.path.isfile(log_file):
|
||||||
|
|
@ -88,7 +88,7 @@ class MyLogger:
|
||||||
|
|
||||||
def add_main_handler(self):
|
def add_main_handler(self):
|
||||||
"""Add main handler to logger"""
|
"""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.main_handler.addFilter(fmt_filter)
|
||||||
self._logger.addHandler(self.main_handler)
|
self._logger.addHandler(self.main_handler)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue