From b897be8ebb1535952564e52621671f74fd971e79 Mon Sep 17 00:00:00 2001 From: UV Date: Thu, 12 Dec 2024 09:58:25 +0530 Subject: [PATCH 1/4] gh-127805: Clarify Formatter initialization in logging.rst --- Doc/library/logging.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/library/logging.rst b/Doc/library/logging.rst index 235bcc281ac8f8..f316a55caf712c 100644 --- a/Doc/library/logging.rst +++ b/Doc/library/logging.rst @@ -562,7 +562,7 @@ subclasses. However, the :meth:`!__init__` method in subclasses needs to call .. method:: Handler.setFormatter(fmt) - Sets the :class:`Formatter` for this handler to *fmt*. + Sets the :class:`Formatter` for this handler to *fmt*. The *fmt* argument must be an initialized :class:`Formatter` instance. .. method:: Handler.addFilter(filter) From c80bf36c64db02986ed6dec68815abb88c437521 Mon Sep 17 00:00:00 2001 From: UV Date: Thu, 12 Dec 2024 19:47:53 +0530 Subject: [PATCH 2/4] Updated Handler.setFormatter description to include None as a valid fmt argument --- Doc/library/logging.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/library/logging.rst b/Doc/library/logging.rst index f316a55caf712c..52f3206841fea1 100644 --- a/Doc/library/logging.rst +++ b/Doc/library/logging.rst @@ -562,7 +562,7 @@ subclasses. However, the :meth:`!__init__` method in subclasses needs to call .. method:: Handler.setFormatter(fmt) - Sets the :class:`Formatter` for this handler to *fmt*. The *fmt* argument must be an initialized :class:`Formatter` instance. + Sets the :class:`Formatter` for this handler to *fmt*. The *fmt* argument must be an initialized :class:`Formatter` instance or ``None``. .. method:: Handler.addFilter(filter) From df540090d310949b36f8098612aea3abb770c4ca Mon Sep 17 00:00:00 2001 From: UV Date: Fri, 13 Dec 2024 23:33:52 +0530 Subject: [PATCH 3/4] made changes according to the review --- Doc/library/logging.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Doc/library/logging.rst b/Doc/library/logging.rst index 52f3206841fea1..a9dd0e1970b791 100644 --- a/Doc/library/logging.rst +++ b/Doc/library/logging.rst @@ -562,7 +562,8 @@ subclasses. However, the :meth:`!__init__` method in subclasses needs to call .. method:: Handler.setFormatter(fmt) - Sets the :class:`Formatter` for this handler to *fmt*. The *fmt* argument must be an initialized :class:`Formatter` instance or ``None``. + Sets the :class:`Formatter` for this handler to *fmt*. + The *fmt* argument must be a :class:`Formatter` instance or ``None``. .. method:: Handler.addFilter(filter) From 8be8e76c6bfddba8571fa64bd65963162c1ff0f6 Mon Sep 17 00:00:00 2001 From: Vinay Sajip Date: Fri, 21 Feb 2025 06:40:37 +0000 Subject: [PATCH 4/4] Update description of formatter. --- Doc/library/logging.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/library/logging.rst b/Doc/library/logging.rst index a9dd0e1970b791..626696a17d96d9 100644 --- a/Doc/library/logging.rst +++ b/Doc/library/logging.rst @@ -562,7 +562,7 @@ subclasses. However, the :meth:`!__init__` method in subclasses needs to call .. method:: Handler.setFormatter(fmt) - Sets the :class:`Formatter` for this handler to *fmt*. + Sets the formatter for this handler to *fmt*. The *fmt* argument must be a :class:`Formatter` instance or ``None``.