Skip to content

Commit 2188b7e

Browse files
authored
don't use the logger to print panic (#279)
1 parent 858735a commit 2188b7e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

livekit-rtc/livekit/rtc/_ffi_client.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
import signal
1616
import asyncio
17+
import sys
1718
from contextlib import ExitStack
1819
import ctypes
1920
import importlib.resources
@@ -166,7 +167,7 @@ def ffi_event_callback(
166167

167168
return # no need to queue the logs
168169
elif which == "panic":
169-
logger.critical("Panic: %s", event.panic.message)
170+
print("FFI Panic: ", event.panic.message, file=sys.stderr, flush=True)
170171
# We are in a unrecoverable state, terminate the process
171172
os.kill(os.getpid(), signal.SIGTERM)
172173
return

0 commit comments

Comments
 (0)