-
Notifications
You must be signed in to change notification settings - Fork 42
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
logging / log format #471
Comments
Maybe we can do something to make it easier to customise, feel free to come up with some suggestions. But, the logger you are complaining about is You can see in the code, that we install a custom formatter for aiohttp: |
Maybe we can just change that |
I see. Thank you; knowing that it's aiohttp.access is helpful. The verbosity is debatable, and not a big problem for me (especially since I can throttle it now), but the first three lines in my above snippet (and often more lines than that) were malformed and caused weird color-changes in the terminal output. again:
That's the bit that seemed "broken". I say "were" and "seemed" because, since I figured out how to turn this off long ago, I haven't encountered it again. It may also be that somebody fixed something. But I thought I'd finally close this out, one way or another. If you'd like me to try to reproduce this anew, I'll be happy to give it a shot. If you're pretty sure that's a "known" and historic issue, I won't go to any trouble. Thanks again. Sorry for the delayed response. |
There has been no new release in that time, so I don't think anything should have changed. |
Totally understandable. Thank you for your attention to it. I'll close it, with this. And if I get time, I'll look into it further and maybe offer a fix. |
Issue Summary
Cannot throttle logging; logging is "mangled", further motivating the ability to throttle it.
Steps to reproduce
Simply run adev runserver. Log files include verbose "details" like this:
Not only are the log strings malformatted with weird symbols and constant color changes to distract the eyes, they're very long and make it very hard to isolate my own (much more terse) app debug info. None of this logging occurs when running via standard "python -m aiohttp.web", so I assume it's supposed to be additionally "helpful", but it's not. I have turned off sub-package logging via
and even attempted this for 'adev' package, but it has no effect, presumably since I'm not importing adev directly.
I see in aiohttp_devtools/logs.py:83 the code that pumps out the longest "msg" detail for every single message:
As a workaround, I just set log_level to 'CRITICAL' on line 112 (of logs.py, just in my local codebase). Since this setting is tied to the --verbose cli, perhaps one easy approach would be to extend the --verbose idea to include a --terse or --critical-only or something, to allow developers to easily turn off all of the extra adev logging.
TIA
The text was updated successfully, but these errors were encountered: