]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-95913: Add WhatsNew section for new logging APIs (GH-98320)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Wed, 19 Oct 2022 04:34:40 +0000 (21:34 -0700)
committerPablo Galindo <pablogsal@gmail.com>
Sat, 22 Oct 2022 19:39:05 +0000 (20:39 +0100)
* Add entry for new logging.getLevelNamesMapping function

* Add entry for SysLogHandler.createSocket to whatsnew

* Add missing line break between logging bullet list items
(cherry picked from commit 251b8ccd2a4354840ed2d3aeb9b643a999ba792f)

Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
Doc/whatsnew/3.11.rst

index 10534b1b367d2ded099a8e8dd848492648d68eab..cd78b148342a7e2db6c74acaf78568f925e57424 100644 (file)
@@ -781,6 +781,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
 ----