-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Feature Type
Would make my life easier
Feature Description
Hi there,
I’m exploring how logging in LiveKit Agents can be configured. In production mode, the worker outputs JSON-formatted logs to stdout. Our project would prefer plain-text (non-JSON) logging.
Context:
- I inspected the source and found that LiveKit attaches a separate handler to the root logger.
- To tailor logging for our needs, I would need to attach our own handler to the root logger and remove the JSON handler. However, the JSON handler is only attached when
cli.run_appis called. This means it cannot be removed except from within the entrypoint function, in which case there will be a period during which logs are emitted in JSON format.
Questions:
- What is the recommended, clean, and “unhacky” way to solve this?
- The conventional approach for Python libraries is to maintain their own scoped loggers. What is the motivation for attaching the handler directly to the root logger, rather than to a library-specific logger such as "livekit" or "livekit.agents"?
Best regards,
David
Workarounds / Alternatives
No response
Additional Context
No response
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request