Skip to content

Commit d835b3f

Browse files
authored
gh-102582: Fix invalid JSON in Doc/howto/logging-cookbook.rst (GH-102635)
1 parent 60bdc16 commit d835b3f

File tree

1 file changed

+14
-10
lines changed

1 file changed

+14
-10
lines changed

Doc/howto/logging-cookbook.rst

+14-10
Original file line numberDiff line numberDiff line change
@@ -340,23 +340,27 @@ adding a ``filters`` section parallel to ``formatters`` and ``handlers``:
340340

341341
.. code-block:: json
342342
343-
"filters": {
344-
"warnings_and_below": {
345-
"()" : "__main__.filter_maker",
346-
"level": "WARNING"
343+
{
344+
"filters": {
345+
"warnings_and_below": {
346+
"()" : "__main__.filter_maker",
347+
"level": "WARNING"
348+
}
347349
}
348350
}
349351
350352
and changing the section on the ``stdout`` handler to add it:
351353

352354
.. code-block:: json
353355
354-
"stdout": {
355-
"class": "logging.StreamHandler",
356-
"level": "INFO",
357-
"formatter": "simple",
358-
"stream": "ext://sys.stdout",
359-
"filters": ["warnings_and_below"]
356+
{
357+
"stdout": {
358+
"class": "logging.StreamHandler",
359+
"level": "INFO",
360+
"formatter": "simple",
361+
"stream": "ext://sys.stdout",
362+
"filters": ["warnings_and_below"]
363+
}
360364
}
361365
362366
A filter is just a function, so we can define the ``filter_maker`` (a factory

0 commit comments

Comments
 (0)