#14800: Development server should NOT elide favicon from the logs
---------------------------------------+------------------------------------
 Reporter:  RoySmith                   |       Owner:  nobody    
   Status:  new                        |   Milestone:            
Component:  django-admin.py runserver  |     Version:  1.2       
 Keywords:  logging                    |       Stage:  Unreviewed
Has_patch:  0                          |  
---------------------------------------+------------------------------------
 I just wasted a good chunk of the morning trying to figure out why one of
 my view methods was getting called at inappropriate times.  The short
 story is that I had written my url mapping wrong so I was accidentally
 matching requests for /favicon.ico.  The debugging was MUCH harder than it
 should have been because the /favicon.ico requests were not being logged
 -- I was seeing one request come in, and two view methods called!  It
 wasn't until I pulled out the big guns (i.e. tcpdump), that the pieces
 fell into place.

 Anyway, it seems like a serious mis-feature that
 BaseHTTPServer.log_message() deliberately suppresses certain requests:


 {{{
     def log_message(self, format, *args):
         # Don't bother logging requests for admin images or the favicon.
         if self.path.startswith(self.admin_media_prefix) or self.path ==
 '/favicon.ico':
             return
 }}}


 Note the chain of events here: 1) I made a programming mistake, 2) the
 browser was magically asking for something I hadn't requested, and 3) the
 sever was magically suppressing the evidence that 2) was happening.  It's
 a prototyping/teaching/debugging tool.  It should be very explicit about
 what it's doing.  If logging these things makes the output too verbose,
 then provide an option somewhere to suppress it, with the default being to
 log everything.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/14800>
Django <http://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.

Reply via email to