Re: Django performance and logging

2007-04-23 Thread Vinay Sajip
On Apr 8, 2:01 pm, "Deryck Hodge" <[EMAIL PROTECTED]> wrote: > On 4/8/07, Vinay Sajip <[EMAIL PROTECTED]> wrote: > > I have a logger setup for use at work, and I control it via a > LOG_LEVEL setting in settings.py. I don't have logging statements > throughout my code, only in things like the sig

Re: Django performance and logging

2007-04-08 Thread Deryck Hodge
On 4/8/07, Vinay Sajip <[EMAIL PROTECTED]> wrote: > As author of the logging package in Python and a (new) Django user, > I'm very interested in this. Can you give me a little more > information? What sort of impact did it have, quantitatively speaking? > Did you use e.g. logger.isEnabledFor() to

Re: Django performance and logging

2007-04-08 Thread [EMAIL PROTECTED]
If it's any help, I use a middleware to log the queries to a text file. The one below overwrites everything on a page-by-page basis, and I can leave it out of deployed servers. --Simon from django.db import connection class SQLLogMiddleware: def process_response(self, request, response):

Re: Django performance and logging

2007-04-08 Thread Vinay Sajip
> To be fair (because otherwise somebody will claim I'm missing an obvious > point), yes, this could be done via syslog on systems that have it > available. It is still a performance hit (writing to disk isn't free). I > did an experiment early last year to put in calls to the python logging > mod