]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[2.7] bpo-33943: Add references in the docs for logging.basicConfig (GH-7858) (GH...
authorTal Einat <taleinat+github@gmail.com>
Mon, 25 Jun 2018 06:52:35 +0000 (09:52 +0300)
committerGitHub <noreply@github.com>
Mon, 25 Jun 2018 06:52:35 +0000 (09:52 +0300)
Adds references to info about file modes, `time.strftime()`, string formatting
syntaxes, and logging levels.

(cherry picked from commit a8ddf85a84364d2c660e6670a7e06621993d1fdc)

Co-authored-by: Andrés Delfino <adelfino@gmail.com>
Doc/library/logging.rst

index 0f568aaa97604be5e6e22e2418fe8be79b1e3fdb..09cae18cfde4450f9556d87bd852d16a268d3ccc 100644 (file)
@@ -949,26 +949,26 @@ functions.
    +--------------+---------------------------------------------+
    | Format       | Description                                 |
    +==============+=============================================+
-   | ``filename`` | Specifies that a FileHandler be created,    |
+   | *filename*   | Specifies that a FileHandler be created,    |
    |              | using the specified filename, rather than a |
    |              | StreamHandler.                              |
    +--------------+---------------------------------------------+
-   | ``filemode`` | Specifies the mode to open the file, if     |
-   |              | filename is specified (if filemode is       |
-   |              | unspecified, it defaults to 'a').           |
+   | *filemode*   | If *filename* is specified, open the file   |
+   |              | in this mode. Defaults to ``'a'``.          |
    +--------------+---------------------------------------------+
-   | ``format``   | Use the specified format string for the     |
+   | *format*     | Use the specified format string for the     |
    |              | handler.                                    |
    +--------------+---------------------------------------------+
-   | ``datefmt``  | Use the specified date/time format.         |
+   | *datefmt*    | Use the specified date/time format, as      |
+   |              | accepted by :func:`time.strftime`.          |
    +--------------+---------------------------------------------+
-   | ``level``    | Set the root logger level to the specified  |
-   |              | level.                                      |
+   | *level*      | Set the root logger level to the specified  |
+   |              | :ref:`level <levels>`.                      |
    +--------------+---------------------------------------------+
-   | ``stream``   | Use the specified stream to initialize the  |
+   | *stream*     | Use the specified stream to initialize the  |
    |              | StreamHandler. Note that this argument is   |
-   |              | incompatible with 'filename' - if both are  |
-   |              | present, 'stream' is ignored.               |
+   |              | incompatible with *filename* - if both are  |
+   |              | present, *stream* is ignored.               |
    +--------------+---------------------------------------------+