Skip to content

Variety of access logging issues #2641

Closed
@thehesiod

Description

Issue 1

Looks like duplicate log format names was accidentally introduced: both %t and %T resolve to request_time see https://github.com/aio-libs/aiohttp/blob/master/aiohttp/helpers.py#L293-L299

each one should have a unique name, thoughts? Perhaps %T[f] + %D should be request_elapsed[_frac]

another idea is perhaps we should rename this to _LOG_FORMAT_MAP for 3.x?

Issue 2

%t is not the start time of the request, it's just the time the log entry was created (not meaningful). I suggest fixing this to be the time the request was received.

Issue 3

the base AccessLogger is not using self in __init__ so it's impossible for subclasses to replace methods like _format_t

Issue 4

logging of multiple header values doesn't serialize to extras, last one overwrites the others.

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