diff options
| author | Claude Paroz <claude@2xlibre.net> | 2012-09-24 22:11:42 +0200 |
|---|---|---|
| committer | Claude Paroz <claude@2xlibre.net> | 2012-09-24 22:12:45 +0200 |
| commit | fc69fff9ab5bba8a6cff3eaf51f02a3204b1c015 (patch) | |
| tree | c8ef89d4346f70b560d952f4aca168135ae6d5bc /docs | |
| parent | e72e22e518a730cd28cd68c9374fa79a45e27a9c (diff) | |
Fixed #14861 -- Moved logging config outside of Settings.__init__
Thanks donspaulding for the report and simonpercivall for the
initial patch.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/topics/logging.txt | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/docs/topics/logging.txt b/docs/topics/logging.txt index 94236babd6..a4aae0bc02 100644 --- a/docs/topics/logging.txt +++ b/docs/topics/logging.txt @@ -345,36 +345,6 @@ This logging configuration does the following things: printed to the console; ``ERROR`` and ``CRITICAL`` messages will also be output via email. -.. admonition:: Custom handlers and circular imports - - If your ``settings.py`` specifies a custom handler class and the file - defining that class also imports ``settings.py`` a circular import will - occur. - - For example, if ``settings.py`` contains the following config for - :setting:`LOGGING`:: - - LOGGING = { - 'version': 1, - 'handlers': { - 'custom_handler': { - 'level': 'INFO', - 'class': 'myproject.logconfig.MyHandler', - } - } - } - - and ``myproject/logconfig.py`` has the following line before the - ``MyHandler`` definition:: - - from django.conf import settings - - then the ``dictconfig`` module will raise an exception like the following:: - - ValueError: Unable to configure handler 'custom_handler': - Unable to configure handler 'custom_handler': - 'module' object has no attribute 'logconfig' - .. _formatter documentation: http://docs.python.org/library/logging.html#formatter-objects Custom logging configuration |
