Silence Flask access logs and retain PM2 logs for 3 days.

Stop werkzeug request spam into PM2 error files, truncate oversized logs, and install daily logrotate with 3-day retention.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-07-15 07:53:19 +08:00
parent 8ecc70a61c
commit 1e765f4b2b
7 changed files with 108 additions and 1 deletions
+3
View File
@@ -9844,5 +9844,8 @@ _purge_key_monitors_if_full_margin()
# 启动
if __name__ == "__main__":
from lib.common.flask_access_log_lib import silence_werkzeug_access_log
silence_werkzeug_access_log()
threading.Thread(target=background_task, daemon=True).start()
app.run(host=HOST, port=PORT, debug=DEBUG, threaded=True)