Skip to content

[bug] Gunicorn worker logs are incorrect #458

@sk-

Description

@sk-

Gunicorn workers log the date ('%(t)s' fields) with the apache format. However, for some reason the GunicornWorker is using another format. The same happens to the response size ('%(b) field'). Aiohttp instead of logging the size of the response body is logging the size of the whole response, including the headers.

The problem is in the helper.atoms function
https://github.com/KeepSafe/aiohttp/blob/51ea69d4c863b9a184293371b24e8d3e6651eb25/aiohttp/helpers.py#L228-L260

Below are the results for an app that simply returns Hello, world (12 characters).

Plain Gunicorn
127.0.0.1 - - [03/Aug/2015:14:59:09 -0300] "GET / HTTP/1.1" 200 12 "-" "curl/7.37.1"

Gunicorn + aiohttp.worker.GunicornWorker
127.0.0.1 - - Mon, 03 Aug 2015 17:51:39 GMT "GET / HTTP/1.1" 200 149 "-" "curl/7.37.1"

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions