From ea15ecae7d28d2af5a7cae4af2d10fc63871851e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?The=CC=81o=20Monnom?= Date: Thu, 18 Apr 2024 18:56:53 +0200 Subject: [PATCH 1/2] Update _ffi_client.py --- livekit-rtc/livekit/rtc/_ffi_client.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/livekit-rtc/livekit/rtc/_ffi_client.py b/livekit-rtc/livekit/rtc/_ffi_client.py index ad3cd6b8..a4502bb0 100644 --- a/livekit-rtc/livekit/rtc/_ffi_client.py +++ b/livekit-rtc/livekit/rtc/_ffi_client.py @@ -137,13 +137,13 @@ def ffi_event_callback( if which == "logs": for record in event.logs.records: level = to_python_level(record.level) - rtc_debug = os.environ.get("LIVEKIT_WEBRTC_DEBUG", "").strip() - if ( - record.target == "libwebrtc" - and level == logging.DEBUG - and rtc_debug.lower() not in ("true", "1") - ): - continue + debug_env = os.environ.get("LIVEKIT_RTC_DEBUG", "").strip().lower() + rtc_debug = debug_env in ("true", "1") + + if level == logging.DEBUG and not rtc_debug: + # ignore the rtc debug logs by default + if record.target in ("libwebrtc", "livekit") + continue if level is not None: logger.log( From e15b759a0b19a53e5a5d8d28035a68873c4f2a2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?The=CC=81o=20Monnom?= Date: Thu, 18 Apr 2024 18:57:53 +0200 Subject: [PATCH 2/2] Update _ffi_client.py --- livekit-rtc/livekit/rtc/_ffi_client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/livekit-rtc/livekit/rtc/_ffi_client.py b/livekit-rtc/livekit/rtc/_ffi_client.py index a4502bb0..d564209c 100644 --- a/livekit-rtc/livekit/rtc/_ffi_client.py +++ b/livekit-rtc/livekit/rtc/_ffi_client.py @@ -142,7 +142,7 @@ def ffi_event_callback( if level == logging.DEBUG and not rtc_debug: # ignore the rtc debug logs by default - if record.target in ("libwebrtc", "livekit") + if record.target in ("libwebrtc", "livekit"): continue if level is not None: