Skip to content

Commit

Permalink
gh-95913: Add WhatsNew section for new logging APIs (GH-98320)
Browse files Browse the repository at this point in the history
* 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 251b8cc)

Co-authored-by: C.A.M. Gerlach <[email protected]>
  • Loading branch information
miss-islington and CAM-Gerlach authored Oct 19, 2022
1 parent 39eaca8 commit 202eb48
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions Doc/whatsnew/3.11.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
----

Expand Down

0 comments on commit 202eb48

Please sign in to comment.