diff options
author | Inada Naoki <songofacandy@gmail.com> | 2021-04-13 09:17:03 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-13 09:17:03 (GMT) |
commit | c2b7a66b91cdb96fbfdb160f96797208ddc5e436 (patch) | |
tree | fd8a4bcca046f1ed4fc803c8534d246522a6fb2b /Doc/library | |
parent | a4833883c9b81b6b272cc7c5b67fa1658b65304c (diff) | |
download | cpython-c2b7a66b91cdb96fbfdb160f96797208ddc5e436.zip cpython-c2b7a66b91cdb96fbfdb160f96797208ddc5e436.tar.gz cpython-c2b7a66b91cdb96fbfdb160f96797208ddc5e436.tar.bz2 |
bpo-43731: Add an `encoding` parameter to logging.fileConfig() (GH-25273)
Diffstat (limited to 'Doc/library')
-rw-r--r-- | Doc/library/logging.config.rst | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Doc/library/logging.config.rst b/Doc/library/logging.config.rst index cab49f6..f833bcd 100644 --- a/Doc/library/logging.config.rst +++ b/Doc/library/logging.config.rst @@ -77,7 +77,7 @@ in :mod:`logging` itself) and defining handlers which are declared either in .. versionadded:: 3.2 -.. function:: fileConfig(fname, defaults=None, disable_existing_loggers=True) +.. function:: fileConfig(fname, defaults=None, disable_existing_loggers=True, encoding=None) Reads the logging configuration from a :mod:`configparser`\-format file. The format of the file should be as described in @@ -111,6 +111,8 @@ in :mod:`logging` itself) and defining handlers which are declared either in they or their ancestors are explicitly named in the logging configuration. + :param encoding: The encoding used to open file when *fname* is filename. + .. versionchanged:: 3.4 An instance of a subclass of :class:`~configparser.RawConfigParser` is now accepted as a value for ``fname``. This facilitates: @@ -121,6 +123,9 @@ in :mod:`logging` itself) and defining handlers which are declared either in application (e.g. based on command-line parameters or other aspects of the runtime environment) before being passed to ``fileConfig``. + .. versionadded:: 3.10 + The *encoding* parameter is added. + .. function:: listen(port=DEFAULT_LOGGING_CONFIG_PORT, verify=None) Starts up a socket server on the specified port, and listens for new |