]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-95913: Add WhatsNew section for new logging APIs (#98320)
authorC.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
Wed, 19 Oct 2022 04:25:58 +0000 (23:25 -0500)
committerGitHub <noreply@github.com>
Wed, 19 Oct 2022 04:25:58 +0000 (06:25 +0200)
* Add entry for new logging.getLevelNamesMapping function

* Add entry for SysLogHandler.createSocket to whatsnew

* Add missing line break between logging bullet list items

Doc/whatsnew/3.11.rst

index 79afc1f99e99d92f5b33818f478b6e6ef264af3f..a8dbe06b00b653bd49f0cc63d158ba8ff0a7923b 100644 (file)
@@ -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
 ----