Conversation
I could not take the noise anymore Add the ability to control LiteLLM logging through configuration: - Add --enable-litellm CLI flag - Add CODEGATE_ENABLE_LITELLM environment variable - Add external_loggers.litellm config file option - Set logger level to CRITICAL+1 when disabled to suppress all logging - Update documentation with new logging configuration options This change allows users to enable LiteLLM debug logging when needed while keeping it disabled by default to reduce noise.
|
we could add flags for sqlalchemy, asyncio etc, but I did not want to spend too much time on this and get back to PII |
src/codegate/cli.py
Outdated
| @click.option( | ||
| "--enable-litellm", | ||
| is_flag=True, | ||
| default=False, | ||
| help="Enable LiteLLM logging (includes LiteLLM Proxy, Router, and core)", | ||
| ) |
There was a problem hiding this comment.
nit: not a big deal, but this feels like a cosmetic change rather than a functional one, only relevant for developers. For example, removing litellm would make this option useless, and removing it would be a breaking change.
I would avoid exposing this to the end user with an additional option, and rather only rely on environment variables.
There was a problem hiding this comment.
Very good point! I will make the change.
| - `CODEGATE_ENABLE_LITELLM`: enable LiteLLM logging | ||
| - `CODEGATE_ENABLE_SQLALCHEMY`: enable SQLAlchemy logging | ||
| - `CODEGATE_ENABLE_UVICORN_ERROR`: enable Uvicorn error logging | ||
| - `CODEGATE_ENABLE_AIOSQLITE`: enable aiosqlite logging |
There was a problem hiding this comment.
We probably want to add the word "logging" to these environment variables. Else, it hints at enabling us disabling a whole component
|
going to close and wait for the work @blkt is doing |
Add configurable LiteLLM logging control 🙉
I could not take the noise anymore!
Add the ability to control LiteLLM logging through configuration:
- Add --enable-litellm CLI flag
- Add CODEGATE_ENABLE_LITELLM environment variable
- Add external_loggers.litellm config file option
- Set logger level to CRITICAL+1 when disabled to suppress all logging
- Update documentation with new logging configuration options
This change allows users to enable LiteLLM debug logging when needed while keeping it disabled by default to reduce noise.