log incoming ip addresses in web.py
I'd like to log the IP addresses of machines that access my web.py application. How can I access this data within the web.py framework? I'm happy t开发者_如何学Co send the address to my own logger.
Use web.ctx['ip']
to get the remote ip address. Here is a link which explains what's in the context.
精彩评论