-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Variety of access logging issues #2641
Comments
I've created a PR with a rough idea of a fix |
Let's discuss issues one by one.
|
how about issues 2 + 4 ? |
sorry, forgot to sync change for 4 |
…response headers in access log extra
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a [new issue] for related bugs. |
Issue 1
Looks like duplicate log format names was accidentally introduced: both
%t
and%T
resolve torequest_time
see https://github.com/aio-libs/aiohttp/blob/master/aiohttp/helpers.py#L293-L299each 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.
The text was updated successfully, but these errors were encountered: