Files
crypto_monitor/tests/test_flask_access_log_lib.py
dekun 1e765f4b2b 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>
2026-07-15 07:53:19 +08:00

18 lines
466 B
Python

"""silence_werkzeug_access_log 烟雾测试."""
import logging
import unittest
from lib.common.flask_access_log_lib import silence_werkzeug_access_log
class TestSilenceAccessLog(unittest.TestCase):
def test_sets_warning_level(self):
log = logging.getLogger("werkzeug")
log.setLevel(logging.INFO)
silence_werkzeug_access_log()
self.assertGreaterEqual(log.level, logging.WARNING)
if __name__ == "__main__":
unittest.main()