Feature: logging configuration from file #1772
Labels
Core
Issues related to core FastStream functionality and affects to all brokers
enhancement
New feature or request
good first issue
Good for newcomers
Is your feature request related to a problem? Please describe.
I would like to use
--log-config
argument in FastStream CLI to automatically load my logging configuration from file. This functionality is present in uvicorn and gunicorn.Describe the solution you'd like
FastStream CLI could load configuration file based on extension and use either
logging.fileConfig
orlogging.dictConfig
(with proper parsing).Feature code example
This is the example in gunicorn source code:
https://github.com/benoitc/gunicorn/blob/903792f152af6a27033d458020923cb2bcb11459/gunicorn/glogging.py#L243
Describe alternatives you've considered
I'm currently using my own class that does the same thing but I thought it would be handy to have it implemented in FastStream.
Additional context
This functionality in gunicorn uses
logging.dictConfig
andlogging.fileConfig
.Most likely because
logging.fileConfig
does not support JSON files.The text was updated successfully, but these errors were encountered: