-
-
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
How to use cleanly atoms in aiohttp.server ? #174
Comments
Yes, let's modify this code. Initially I used that code only with wsgi server |
PR would be cool! |
Ok, I will make a PR. |
I think main question where to add support for atoms. It could be server level or web.py level. I'd prefer aiohttp.web @GMLudo are you planing to use aiohttp.web ? |
It's planned, but waiting that aiohttp.web officially released and do his diseases with some users. |
access logging added to aiohttp.web d46679c |
Hi,
I'm using aiohttp.server and self.log_access() in a daemon for a customer, I need to log user agent.
By default, in aiohttp.server, user agent log is enabled via "%(a)s": https://github.com/KeepSafe/aiohttp/blob/master/aiohttp/server.py#L29
But, to show this piece of information, atoms() needs an environ variable: https://github.com/KeepSafe/aiohttp/blob/master/aiohttp/helpers.py#L240
By default in aiohttp.server, environ is None: https://github.com/KeepSafe/aiohttp/blob/master/aiohttp/server.py#L300
https://github.com/KeepSafe/aiohttp/blob/master/aiohttp/server.py#L330
What's the good practice to generate environ variable ?
Generate myself ? It isn't clear for me what it means.
Or maybe, we could change a little bit the code to use directly content in message variable ?
I can make a PR if it's ok for you.
The text was updated successfully, but these errors were encountered: