+1 also, but I'll suggest keeping the ability to get aggregate
statistics, e.g.,

django.db.connection.total_queries
django.db.connection.total_query_time
(and maybe the whole queries list should be renamed as
django.db.connection.recent_queries, so as not to suggest that it's
actually all of them)

Any ideas on a better way to remind people to not have DEBUG on in
production environments? I'm just thinking aloud... maybe manage.py
shell and runserver can have an option (--debug / --production, debug
default) that would override the settings.py setting? (problem there
with the default of making TEMPLATE_DEBUG=DEBUG; both would need to
get changed). The idea here is just to try to reduce to zero the
practical necessity of setting DEBUG manually.

By the way, is there a master list of the switches that the DEBUG flag
flips?

-Ken


On Apr 20, 1:24 pm, Justin Bronn <[EMAIL PROTECTED]> wrote:
> > What do people think of having the debug SQL log limited to only
> > storing the last N queries, with N set to something sensible like 200
> > by default? This behavior could be controlled by a setting so if
> > people want to log everything they can:
>
> > DEBUG_SQL_LOG_LIMIT = 200 # Set to 0 to disable logging, set to None
> > for unlimited logging
>
> +1.
>
> Except that I'd still like `DEBUG=False` to disable logging without
> setting the log limit to 0, but I don't think you were proposing this
> behavior.
>
> Even when debugging, I rarely have to go back more than a few queries
> anyway -- I've been bitten by this more times than I can count ("Why
> is this sucking RAM? Crap, forgot to turn DEBUG off again...").
>
> -Justin
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to