Issue #26462: Doc: reduce literal_block warnings, fix syntax highlighting.

Patch by Julien Palard.
This commit is contained in:
Martin Panter 2016-07-26 11:18:21 +02:00
parent 87ec85f420
commit 1050d2d0c7
47 changed files with 329 additions and 128 deletions

View file

@ -106,7 +106,9 @@ A very simple example is::
logging.warning('Watch out!') # will print a message to the console
logging.info('I told you so') # will not print anything
If you type these lines into a script and run it, you'll see::
If you type these lines into a script and run it, you'll see:
.. code-block:: none
WARNING:root:Watch out!
@ -230,7 +232,9 @@ append the variable data as arguments. For example::
import logging
logging.warning('%s before you %s', 'Look', 'leap!')
will display::
will display:
.. code-block:: none
WARNING:root:Look before you leap!
@ -594,7 +598,9 @@ logger, a console handler, and a simple formatter using Python code::
logger.error('error message')
logger.critical('critical message')
Running this module from the command line produces the following output::
Running this module from the command line produces the following output:
.. code-block:: shell-session
$ python simple_logging_module.py
2005-03-19 15:10:26,618 - simple_example - DEBUG - debug message
@ -653,7 +659,9 @@ Here is the logging.conf file::
format=%(asctime)s - %(name)s - %(levelname)s - %(message)s
datefmt=
The output is nearly identical to that of the non-config-file-based example::
The output is nearly identical to that of the non-config-file-based example:
.. code-block:: shell-session
$ python simple_logging_config.py
2005-03-19 15:38:55,977 - simpleExample - DEBUG - debug message
@ -1073,4 +1081,3 @@ take up any memory.
Useful handlers included with the logging module.
:ref:`A logging cookbook <logging-cookbook>`