fierce-jordan-44682
09/25/2025, 9:56 AMprovider = trace.get_tracer_provider()
set_tracer_provider(provider)
It successfully moves the logs to logfire, but the issue now is that I can't have control of how livekit is logging it. Livekit logs each conversation history as a span, where there is system message, user message and assistant message, which would pile up as the conversation prolongs. Is there a way for us to configure what gets sent? or perhaps able to set which as debug level and which at info level?tall-airline-16756
09/25/2025, 9:56 AMtall-airline-16756
09/25/2025, 9:57 AMfierce-jordan-44682
09/25/2025, 10:00 AMtall-airline-16756
09/25/2025, 10:00 AMsetLogLevel to choose levels like debug, info, or error. Here’s a simple example:
import { setLogLevel, LogLevel } from 'livekit-client';
setLogLevel(LogLevel.debug);
• React Native: Works similarly to JavaScript, and you have the flexibility to set different levels for @livekit/react-native and @livekit-client.
• Flutter: Just use setLoggingLevel with options like kINFO or kSEVERE.
• Android: You can set LiveKit.loggingLevel to DEBUG, INFO, and so on.
2. Custom Logging:
• If you want to send logs to external services like Sentry or Datadog, try using setLogExtension (JavaScript).
3. Server/Agent Logs:
• Within your Dockerfile, you can set log levels using --log-level=DEBUG.
• To forward logs to Datadog, just set the DATADOG_TOKEN secret.
If you’d like, I’m here to provide specific examples or walk you through any part of your setup. Just let me know! Sources: src/logger.ts | docs/types/SetLogLevelOptions.html | web/e2ee.logger.dart | livekit-android-sdk/src/main/java/io/livekit/android/util/LKLog.kt | packages/core/src/logger.tsfierce-jordan-44682
09/25/2025, 3:00 PMtall-airline-16756
09/25/2025, 3:00 PMsetLogLevel to set levels like debug or info either globally or for specific parts like Room or Participant.
• For server-side components, you can adjust the log level using command-line flags (like --log-level=DEBUG) or through configuration files.
If you’re looking for more detailed control, setLogExtension lets you intercept logs and send them to external services where you can filter or categorize them however you need. Feel free to reach out if you’d like a hand setting this up—I’m here to help! Sources: Sources/LiveKit/Broadcast/Support/OSLogHandler.swift | Worker options | LiveKit Docs | config-sample.yaml | src/logger.ts | docs/functions/setLogLevel.html