summaryrefslogtreecommitdiff
path: root/Doc
diff options
context:
space:
mode:
authorPrince Roshan <princekrroshan01@gmail.com>2023-05-18 09:50:47 +0530
committerGitHub <noreply@github.com>2023-05-18 05:20:47 +0100
commit152227b569c3a9b87fe0483706f704762ced6d75 (patch)
tree5b0eaf24758bbb4aa37ca53f7a4f40cf7cdbe034 /Doc
parentc5b670efd1e6dabc94b6308734d63f762480b80f (diff)
downloadcpython-git-152227b569c3a9b87fe0483706f704762ced6d75.tar.gz
gh-103606: Improve error message from logging.config.FileConfig (GH-103628)HEADmain
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/logging.config.rst8
1 files changed, 8 insertions, 0 deletions
diff --git a/Doc/library/logging.config.rst b/Doc/library/logging.config.rst
index 8f0b833f85..452832f26a 100644
--- a/Doc/library/logging.config.rst
+++ b/Doc/library/logging.config.rst
@@ -87,6 +87,10 @@ in :mod:`logging` itself) and defining handlers which are declared either in
provides a mechanism to present the choices and load the chosen
configuration).
+ It will raise :exc:`FileNotFoundError` if the file
+ doesn't exist and :exc:`ValueError` if the file is invalid or
+ empty.
+
:param fname: A filename, or a file-like object, or an instance derived
from :class:`~configparser.RawConfigParser`. If a
``RawConfigParser``-derived instance is passed, it is used as
@@ -126,6 +130,10 @@ in :mod:`logging` itself) and defining handlers which are declared either in
.. versionadded:: 3.10
The *encoding* parameter is added.
+ .. versionadded:: 3.12
+ An exception will be thrown if the provided file
+ doesn't exist or is invalid or empty.
+
.. function:: listen(port=DEFAULT_LOGGING_CONFIG_PORT, verify=None)
Starts up a socket server on the specified port, and listens for new