Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Configure gunicorn access log (#246)
* Explicitly enable the access log (since currently it's only enabled when using the classic Python buildpack, and not locally or when using the Python CNB). * Customise the gunicorn access log format to make it use the Heroku logfmt style, and to improve which fields are included. Before: ``` 2024-12-08T16:23:33.457957+00:00 app[web.1]: ::ffff:10.1.50.245 - - [08/Dec/2024:16:23:33 +0000] "GET / HTTP/1.1" 200 9585 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:134.0) Gecko/20100101 Firefox/134.0" ``` After: ``` 2024-12-08T16:32:47.618296+00:00 app[web.1]: gunicorn method=GET path="/" status=200 duration=14ms request_id=e45f9c86-d6d8-4b79-937e-18c0b6bf859e fwd="123.456.789.0" user_agent="Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:134.0) Gecko/20100101 Firefox/134.0" ``` Ref heroku/buildpacks-python#4. GUS-W-17316745.
- Loading branch information