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 avoid computing the
> arguments unnecessarily? I would like to see if it is possible for
> Django to use Python logging (perhaps only in debug mode), and if
> there are bottlenecks which preclude this, I would like to see what
> can be done to improve matters - so I would appreciate your feedback.
>

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 signal receiver that sends
an email alert when a new object is created, so I don't notice any
performance hit.  This is a subjective feeling, though, and not
benchmarked.  I mainly use logging just to track that certain code
paths are doing what I expect when run normally.

I would think you would want it configurable, however, not automatic
on debug.  We run development in DEBUG, which I assume is common, and
that could generate noisy logs.  And what if I just wanted critical
notices?  Changing a log level setting seems the right way to do this.

However, I know from talking to Adrian that he's not warm to the idea
of logging in Django itself. :-)  And for understandable reasons.  It
would be interesting to actually test the impact of a logger, though,
just to know for sure.

Cheers,
deryck

--
Deryck Hodge
Web Developer, Product Development
Washington Post.Newsweek Interactive
http://www.devurandom.org/

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@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-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to