Getting logging to work using FastAPI in a production ECS environment is a mess of configuration and awkward interfaces. For example, there are multiple modules that interact in subtle ways: the python logging
module, uvicorn
, and gunicorn
. Take a look at this example of the ceremony required to appease all three loggers depending on the run time—not quite the spirit of python ‘explicit over implicit’.
See also:
- In this case, the fundamental theorem of software engineering could be rewritten that too many layers of indirection results in a ball of mud