Skip to content

Commit

Permalink
debug logs must be explicitly enabled (#192)
Browse files Browse the repository at this point in the history
  • Loading branch information
theomonnom authored Apr 18, 2024
1 parent e526d72 commit f657c45
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions livekit-rtc/livekit/rtc/_ffi_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit f657c45

Please sign in to comment.