On Tue, Sep 28, 2010 at 11:45 PM, Ian Lewis <[email protected]> wrote: > Hi, > > On Tue, Sep 28, 2010 at 9:19 AM, Nick Phillips > <[email protected]> wrote: >> I'm worried by the use of "warning" for all 4xx statuses. I think it >> still makes sense to use the "original" syslog level definitions[*] as a >> guide, and on there I'd suggest that some 4xx statuses would merit >> "Info", some "Notice", and maybe one or two "Warning". "Notice" not >> being included in Python's default logging, I guess that means I'd split >> them between "Info" and "Warning". >> >> My view is that the main use of these logs to me is to help me see when >> someone is doing Bad Things (or trying to) to my system. I would be >> wanting anything that indicated a targeted exploration of my server to >> show up as "Warning", and anything that's most likely a random script >> kiddie to be "Info". That certainly puts 404 in as "Info"; I see so many >> hits looking for e.g. poorly-configured phpmyadmin installations, that >> 404s would swamp anything that I really needed to be looking at. > > I'm split on this myself but I think making all 400 level responses warnings > would keep things consistent and help find potential security issues easier. > > Something like > > 5xx = error > 4xx = warning > 3xx = info > 2xx (>300) = debug > > would be very easy to understand and the desired request logging is easy > to set up using logging levels.
It's important to note that I've deliberately *not* included logging calls for 3XX and 2XX responses. Django's logging isn't intended as a replacement for Apache/webserver logging; it's there as a supplement. The warning/error condidtions are the occasions when you're likely to want/need the extra request data to work out what went wrong, hence the logging calls. 3XX and 2XX calls are normal operation, so they shouldn't require any special handling above and beyond what the webserver does. Yours, Russ Magee %-) -- You received this message because you are subscribed to the Google Groups "Django developers" 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-developers?hl=en.
