summaryrefslogtreecommitdiff
path: root/django/__init__.py
diff options
context:
space:
mode:
authorClaude Paroz <claude@2xlibre.net>2013-12-31 12:28:01 +0100
committerClaude Paroz <claude@2xlibre.net>2013-12-31 18:35:00 +0100
commitb8e3373f458aa363d59c61b58be390a5a1156467 (patch)
treee2805d1eff7056999c5cf46b6c4c088fbae8d790 /django/__init__.py
parent1d23d766ab85301eb527629400933fd601355f1a (diff)
Fixed #21714 -- Moved logging configuration to global setup()
Thanks Aymeric Augustin for the report and the review.
Diffstat (limited to 'django/__init__.py')
-rw-r--r--django/__init__.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/django/__init__.py b/django/__init__.py
index 69be8c9984..14c941601a 100644
--- a/django/__init__.py
+++ b/django/__init__.py
@@ -9,8 +9,13 @@ def get_version(*args, **kwargs):
def setup():
- # Configure the settings (this happens as a side effect of accessing
- # INSTALLED_APPS or any other setting) and populate the app registry.
+ """
+ Configure the settings (this happens as a side effect of accessing the
+ first setting), configure logging and populate the app registry.
+ """
from django.apps import apps
from django.conf import settings
+ from django.utils.log import configure_logging
+
+ configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
apps.populate(settings.INSTALLED_APPS)