#16301: Show clients remote IP when running runserver
-------------------------+------------------------------
Reporter: jeyaseel@… | Owner: nobody
Type: New feature | Status: new
Milestone: | Component: Core (Other)
Version: 1.3 | Severity: Normal
Keywords: | Triage Stage: Unreviewed
Has patch: 1 | Easy pickings: 0
UI/UX: 0 |
-------------------------+------------------------------
When running the dev-server (runserver), it would be nice to have the
remote clients IP shown in the logs.
Fix:
In basehttp.py (django/core/servers), change this line in the
log_message() method:
msg = "[%s] %s\n" % (self.log_date_time_string(), format % args)
to:
msg = "[%s] (%s) %s\n" % (self.log_date_time_string(),
self.client_address[0], format % args)
Makes your log look like this:
[20/Jun/2011 14:32:13] (85.xx.xx.xx) "GET /full_list/ HTTP/1.1" 200 79
--
Ticket URL: <https://code.djangoproject.com/ticket/16301>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en.