big-school-62939
04/15/2026, 9:00 PMtall-airline-16756
04/15/2026, 9:00 PMtall-airline-16756
04/15/2026, 9:00 PMprint() output isn’t showing when you run lk agent logs.
Short answer: use the Python logging module (and check log level) instead of print(). print() can be buffered or not captured by the agent runtime, so it often won’t appear in lk agent logs.
What to do:
• Replace prints with logging:
import logging
logger = logging.getLogger("my_agent")
logger.setLevel(logging.INFO)
logger.info("This message will appear in lk agent logs")
• Increase verbosity if you need debug output:
◦ Start the agent with --log-level=DEBUG or set the LIVEKIT_LOG_LEVEL=DEBUG environment variable.
• If you must keep print() during quick tests, flush stdout immediately: print("msg", flush=True) — but logging is the reliable solution.
• Ensure you’re on LiveKit Agents SDK v1.5.0 or newer for enhanced logging support.
If you want, paste a short snippet of your agent startup/logging code and I’ll point out exactly where to change it.
Sources: Where to find your Agent Logs | LiveKit, with interactive elements