Opened 3 years ago

Closed 3 years ago

Last modified 10 days ago

#16301 closed New feature (wontfix)

Show clients remote IP when running runserver

Reported by: jeyaseel@… Owned by: nobody
Component: Core (Other) Version: 1.3
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


When running the dev-server (runserver), it would be nice to have the remote clients IP shown in the logs.

In (django/core/servers), change this line in the log_message() method:

msg = "[%s] %s\n" % (self.log_date_time_string(), format % args)


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

Attachments (0)

Change History (3)

comment:1 Changed 3 years ago by russellm

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to wontfix
  • Status changed from new to closed

Marking this wontfix. If you're developing, there should only be one person hitting the server -- you --so the IP address of the requesting user should be well known. Including the IP address sounds to me like something you only need if you're exposing the development server to real traffic, which you shouldn't be doing. We deliberately hobble the development server to make it difficult (or impractical) to use it as a deployment server.

If you can make a strong counterargument for why the IP should be included, feel free to start a discussion on django-developers about this idea.

comment:2 Changed 10 days ago by cyberplant-django@…


Sorry for reviving this old issue. In my case I'm developing locally with my notebook, and the server is processing requests from my notebook, my tablet and my chromecast.

It would be handy to know which device did which requests. Now I'm getting duplicated requests and don't know which device is doing that.

What do you think?

comment:3 Changed 10 days ago by timo

My first reaction is that it would add a lot of noise to the logs for most people who don't care about the IP. As noted in comment 1, you should bring the discussion to the DevelopersMailingList where you'll get more feedback than commenting on a closed ticket.

Add Comment

Modify Ticket

Change Properties
<Author field>
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.