]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.12] gh-127805: Clarify Formatter initialization in logging.rst. (GH-127850) (...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Mon, 24 Feb 2025 04:01:30 +0000 (05:01 +0100)
committerGitHub <noreply@github.com>
Mon, 24 Feb 2025 04:01:30 +0000 (23:01 -0500)
gh-127805: Clarify Formatter initialization in logging.rst. (GH-127850)
(cherry picked from commit 5d66c55c8ad0a0aeff8d06021ddca1d02c5f4416)

Co-authored-by: UV <yuvrajpradhan667@gmail.com>
Doc/library/logging.rst

index 5795645f71d1cd34e26b3bde134307bde4baabed..a5f34665d5cb2b16315069ae0d7fd0864bdb7c16 100644 (file)
@@ -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*.
+      Sets the formatter for this handler to *fmt*.
+      The *fmt* argument must be a :class:`Formatter` instance or ``None``.
 
 
    .. method:: Handler.addFilter(filter)