From 49049deb821edb8cc36e1438140eebda67877935 Mon Sep 17 00:00:00 2001 From: Christian Decker Date: Wed, 14 Jan 2026 14:58:06 +0100 Subject: [PATCH] testing: Add TEST_LOG_IGNORE_ERRORS envvar to suppress logging errors --- contrib/pyln-testing/pyln/testing/fixtures.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/contrib/pyln-testing/pyln/testing/fixtures.py b/contrib/pyln-testing/pyln/testing/fixtures.py index 5a439677b..c5015ed3a 100644 --- a/contrib/pyln-testing/pyln/testing/fixtures.py +++ b/contrib/pyln-testing/pyln/testing/fixtures.py @@ -59,6 +59,9 @@ def setup_logging(): if TEST_DEBUG: logging.basicConfig(level=logging.DEBUG, stream=sys.stdout) + if env("TEST_LOG_IGNORE_ERRORS", "0") == "1": + logging.raiseExceptions = False + yield loggers = [logging.getLogger()] + list(logging.Logger.manager.loggerDict.values())