diff options
author | C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM> | 2022-10-19 04:25:58 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-19 04:25:58 (GMT) |
commit | 251b8ccd2a4354840ed2d3aeb9b643a999ba792f (patch) | |
tree | c41a157bd5698eccb16dd50a189d9117883188f5 | |
parent | a53f637368c1e3b8bc5513cb2b0c3d7a3dff321a (diff) | |
download | cpython-251b8ccd2a4354840ed2d3aeb9b643a999ba792f.zip cpython-251b8ccd2a4354840ed2d3aeb9b643a999ba792f.tar.gz cpython-251b8ccd2a4354840ed2d3aeb9b643a999ba792f.tar.bz2 |
gh-95913: Add WhatsNew section for new logging APIs (#98320)
* Add entry for new logging.getLevelNamesMapping function
* Add entry for SysLogHandler.createSocket to whatsnew
* Add missing line break between logging bullet list items
-rw-r--r-- | Doc/whatsnew/3.11.rst | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/Doc/whatsnew/3.11.rst b/Doc/whatsnew/3.11.rst index 79afc1f..a8dbe06 100644 --- a/Doc/whatsnew/3.11.rst +++ b/Doc/whatsnew/3.11.rst @@ -799,6 +799,26 @@ locale ``locale.getpreferredencoding(False)`` but ignores the :ref:`Python UTF-8 Mode <utf8-mode>`. + +.. _whatsnew311-logging: + +logging +------- + +* Added :func:`~logging.getLevelNamesMapping` + to return a mapping from logging level names (e.g. ``'CRITICAL'``) + to the values of their corresponding :ref:`levels` (e.g. ``50``, by default). + (Contributed by Andrei Kulakovin in :gh:`88024`.) + +* Added a :meth:`~logging.handlers.SysLogHandler.createSocket` method + to :class:`~logging.handlers.SysLogHandler`, to match + :meth:`SocketHandler.createSocket() + <logging.handlers.SocketHandler.createSocket>`. + It is called automatically during handler initialization + and when emitting an event, if there is no active socket. + (Contributed by Kirill Pinchuk in :gh:`88457`.) + + math ---- |