From 46c3e5f374f16bcb65e046efb2f51ff7e038660f Mon Sep 17 00:00:00 2001 From: Maximilian Hils Date: Mon, 19 Sep 2022 16:42:38 +0200 Subject: [PATCH] don't dim debug logs that makes them too hard to read. --- mitmproxy/log.py | 2 +- test/mitmproxy/addons/test_termlog.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mitmproxy/log.py b/mitmproxy/log.py index 2e4597372..05b609c7d 100644 --- a/mitmproxy/log.py +++ b/mitmproxy/log.py @@ -51,7 +51,7 @@ class MitmFormatter(logging.Formatter): message = miniclick.style( message, fg=LOG_COLORS.get(record.levelno), - dim=(record.levelno <= logging.DEBUG) + # dim=(record.levelno <= logging.DEBUG) ) if client := getattr(record, "client", None): client = human.format_address(client) diff --git a/test/mitmproxy/addons/test_termlog.py b/test/mitmproxy/addons/test_termlog.py index c742c80e3..209f8eb89 100644 --- a/test/mitmproxy/addons/test_termlog.py +++ b/test/mitmproxy/addons/test_termlog.py @@ -53,5 +53,5 @@ async def test_styling(monkeypatch) -> None: tctx.configure(t) logging.warning("hello") - assert "\x1b[33m\x1b[22mhello\x1b[0m" in f.getvalue() + assert "\x1b[33mhello\x1b[0m" in f.getvalue() t.done()