diff options
| author | Claude Paroz <claude@2xlibre.net> | 2012-09-24 22:30:38 +0200 |
|---|---|---|
| committer | Claude Paroz <claude@2xlibre.net> | 2012-09-29 22:56:18 +0200 |
| commit | a014ddfef2f606471f25c756d97b3b50fcbd9e91 (patch) | |
| tree | 387712a6b25cba824d7797f9214a41f374f83cea /django/conf/__init__.py | |
| parent | 15202baace1453e7576806f13d137ae930de6dcb (diff) | |
Combined Django DEFAULT_LOGGING with user LOGGING config
Refs #18993.
Diffstat (limited to 'django/conf/__init__.py')
| -rw-r--r-- | django/conf/__init__.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/django/conf/__init__.py b/django/conf/__init__.py index d636ff0b6c..7452013671 100644 --- a/django/conf/__init__.py +++ b/django/conf/__init__.py @@ -55,16 +55,20 @@ class LazySettings(LazyObject): Setup logging from LOGGING_CONFIG and LOGGING settings. """ if self.LOGGING_CONFIG: + from django.utils.log import DEFAULT_LOGGING # First find the logging configuration function ... logging_config_path, logging_config_func_name = self.LOGGING_CONFIG.rsplit('.', 1) logging_config_module = importlib.import_module(logging_config_path) logging_config_func = getattr(logging_config_module, logging_config_func_name) - # Backwards-compatibility shim for #16288 fix - compat_patch_logging_config(self.LOGGING) + logging_config_func(DEFAULT_LOGGING) - # ... then invoke it with the logging settings - logging_config_func(self.LOGGING) + if self.LOGGING: + # Backwards-compatibility shim for #16288 fix + compat_patch_logging_config(self.LOGGING) + + # ... then invoke it with the logging settings + logging_config_func(self.LOGGING) def configure(self, default_settings=global_settings, **options): """ |
