-
-
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
Make log format %b doc reflect behavior and docstring #3312
Make log format %b doc reflect behavior and docstring #3312
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3312 +/- ##
==========================================
- Coverage 98.06% 98.02% -0.04%
==========================================
Files 43 43
Lines 8018 8018
Branches 1355 1355
==========================================
- Hits 7863 7860 -3
- Misses 63 65 +2
- Partials 92 93 +1
Continue to review full report at Codecov.
|
Sorry, was pretty busy today. The source of misunderstanding is: Logger codes were designed after Apache mnemonics: https://httpd.apache.org/docs/2.4/mod/mod_log_config.html#formats
Do you like the idea? |
It looks like "both full message size and body length" were indeed supported... I seem to have stumbled on something more complex than just the doc bug. My feeling is that we should for now just merge this doc change to re-sync, and address the underlying "what the behavior should be" question elsewhere. |
Sorry, I can't help much here since the only things I do with access logger is turn it off or keep it in default state. But if docs says one, but code works in other way, it's good to fix the docs at the first place and then propose changes to the code if they are needed. |
Merged! @cdunklau thanks! |
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. |
What do these changes do?
Update logging doc to reflect behavior and
aiohttp.helpers.AccessLogger
docs, fixing #3307.I dug into the tests to make sure the full-response-size behavior is tested, but I'm confused about what this test is doing with
response.body_length
, or rather, what that attribute actually means:aiohttp/tests/test_helpers.py
Lines 185 to 216 in 4c4401a
ISTM that
body_length
would be the length of the response content, excluding status line, headers, and terminating blank line, but that doesn't reflect how it's used... it looks like that's the length of the entire response, not just the content. @asvetlov could you suggest how to make sure this test exercises that behavior, or should I work on a separate one?Checklist
CONTRIBUTORS.txt
CHANGES
folder<issue_id>.<type>
for example (588.bugfix)issue_id
change it to the pr id after creating the pr.feature
: Signifying a new feature..bugfix
: Signifying a bug fix..doc
: Signifying a documentation improvement..removal
: Signifying a deprecation or removal of public API..misc
: A ticket has been closed, but it is not of interest to users.