You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Most of the Python tooling ecosystem has switched over from tool-specific configuration files to configuration via pyproject.toml. It would be great if the logging configuration (or Uvicorn in general) could be configured via pyproject.toml.
Here is the behavior I suggest:
Logging can be setup in pyproject.toml in the same or similar way as the logging518 package expects. The logging configuration should NOT be setup under a uvicorn table header as the logging setup in pyproject.toml should be independent from uvicorn. This will also allow other tools to read the logging configuration from an expected location in the future.
Logging configuration provided via pyproject.toml is used by uvicorn automatically without needing to explicitly pass the configuration file location
Logging configuration in pyproject.toml can be overridden by providing a file path to log-config parameter as is done in previous versions. This will maintain backwards compatibility.
Theoretically, we could apply this same strategy to any other uvicorn configuration to make it completely configurable via pyproject.toml (although unlike logging, uvicorn-specific configuration items could be under a uvicorn table header). Similarly, values in the pyproject.toml will be used automatically and can be overridden by explicitly passing values to uvicorn.run
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Most of the Python tooling ecosystem has switched over from tool-specific configuration files to configuration via pyproject.toml. It would be great if the logging configuration (or Uvicorn in general) could be configured via pyproject.toml.
Here is the behavior I suggest:
uvicorn.run
Beta Was this translation helpful? Give feedback.
All reactions