浏览代码

Added filename caption to LOGGING documentation examples.

Curtis Maloney 5 年之前
父节点
当前提交
4442ee8a51
共有 1 个文件被更改,包括 9 次插入0 次删除
  1. 9 0
      docs/topics/logging.txt

+ 9 - 0
docs/topics/logging.txt

@@ -242,6 +242,9 @@ However, to give you a taste of what is possible, here are several examples.
 First, here's a simple configuration which writes all logging from the
 :ref:`django-logger` logger to a local file::
 
+  .. code-block:: python
+    :caption: settings.py
+
     LOGGING = {
         'version': 1,
         'disable_existing_loggers': False,
@@ -274,6 +277,9 @@ messages. With this config, however, you can also set the environment variable
 ``DJANGO_LOG_LEVEL=DEBUG`` to see all of Django's debug logging which is very
 verbose as it includes all database queries::
 
+  .. code-block:: python
+    :caption: settings.py
+
     import os
 
     LOGGING = {
@@ -294,6 +300,9 @@ verbose as it includes all database queries::
 
 Finally, here's an example of a fairly complex logging setup::
 
+  .. code-block:: python
+    :caption: settings.py
+
     LOGGING = {
         'version': 1,
         'disable_existing_loggers': False,