On May 28, 9:16 pm, Mathieu Leduc-Hamel <marra...@gmail.com> wrote:
> I would say, why not use the default python way to config logging,
> handler and loggers ? it work fine and many projects are using it.
> That way, we'll be able to use the same logging configuration for our
> django projects and the different python library that we may use and
> we the logging is implemented using the default python way.
>
> I don't exactly understand why it should be in the settings.py file ?
>

What's proposed to be in settings.py is the actual configuration, not
the mechanism. The mechanism will be the new-in-Python-2.7-and-3.2
configuration via dictionaries (rather than via Python code or the ini-
style confguration files - see PEP 391 for more details of the
rationale behind dict-based configuration).

Existing projects (like Django) can use the standalone dictconfig
project on BitBucket to get the functionality which will be in Python
2.7 and 3.2, for use with earlier versions of Python. So really,
Django is using the same mechanisms as Python for logging. It's good
practice to put a shallow interface between the Django and Python
logging configuration layers, to allow Django to specify sensible
defaults. (There's an example of that in my Launchpad branch - the
Django layer adds a default key in the dictionary to specify that by
default, existing loggers are not disabled when configuration
happens.)

Logging of third-party libraries and django-apps (which make use of
logging) in a Django site will be customisable through the logging
configuration mechanism being proposed. All of Django, your apps and
their dependencies, third-party apps and their dependencies - if any
of them already use logging in the conventional way, you will be able
to modify their logging behaviour through this mechanism.

Regards,

Vinay Sajip

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-develop...@googlegroups.com.
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.

Reply via email to