Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f5a16b4

Browse files
[doc] Add link to FileHandler in logging (GH-21940)
Co-authored-by: Andrés Delfino <[email protected]>
1 parent a4c4e17 commit f5a16b4

1 file changed

Lines changed: 16 additions & 15 deletions

File tree

Doc/library/logging.rst

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1166,9 +1166,9 @@ functions.
11661166
+--------------+---------------------------------------------+
11671167
| Format | Description |
11681168
+==============+=============================================+
1169-
| *filename* | Specifies that a FileHandler be created, |
1170-
| | using the specified filename, rather than a |
1171-
| | StreamHandler. |
1169+
| *filename* | Specifies that a :class:`FileHandler` be |
1170+
| | created, using the specified filename, |
1171+
| | rather than a :class:`StreamHandler`. |
11721172
+--------------+---------------------------------------------+
11731173
| *filemode* | If *filename* is specified, open the file |
11741174
| | in this :ref:`mode <filemodes>`. Defaults |
@@ -1192,9 +1192,10 @@ functions.
11921192
| | :ref:`level <levels>`. |
11931193
+--------------+---------------------------------------------+
11941194
| *stream* | Use the specified stream to initialize the |
1195-
| | StreamHandler. Note that this argument is |
1196-
| | incompatible with *filename* - if both |
1197-
| | are present, a ``ValueError`` is raised. |
1195+
| | :class:`StreamHandler`. Note that this |
1196+
| | argument is incompatible with *filename* - |
1197+
| | if both are present, a ``ValueError`` is |
1198+
| | raised. |
11981199
+--------------+---------------------------------------------+
11991200
| *handlers* | If specified, this should be an iterable of |
12001201
| | already created handlers to add to the root |
@@ -1213,18 +1214,18 @@ functions.
12131214
+--------------+---------------------------------------------+
12141215
| *encoding* | If this keyword argument is specified along |
12151216
| | with *filename*, its value is used when the |
1216-
| | FileHandler is created, and thus used when |
1217-
| | opening the output file. |
1217+
| | :class:`FileHandler` is created, and thus |
1218+
| | used when opening the output file. |
12181219
+--------------+---------------------------------------------+
12191220
| *errors* | If this keyword argument is specified along |
12201221
| | with *filename*, its value is used when the |
1221-
| | FileHandler is created, and thus used when |
1222-
| | opening the output file. If not specified, |
1223-
| | the value 'backslashreplace' is used. Note |
1224-
| | that if ``None`` is specified, it will be |
1225-
| | passed as such to :func:`open`, which means |
1226-
| | that it will be treated the same as passing |
1227-
| | 'errors'. |
1222+
| | :class:`FileHandler` is created, and thus |
1223+
| | used when opening the output file. If not |
1224+
| | specified, the value 'backslashreplace' is |
1225+
| | used. Note that if ``None`` is specified, |
1226+
| | it will be passed as such to :func:`open`, |
1227+
| | which means that it will be treated the |
1228+
| | same as passing 'errors'. |
12281229
+--------------+---------------------------------------------+
12291230

12301231
.. versionchanged:: 3.2

0 commit comments

Comments
 (0)