mirror of
https://github.com/python/cpython.git
synced 2025-10-03 13:45:29 +00:00
gh-95913: Add WhatsNew section for new logging APIs (GH-98320)
* 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 251b8ccd2a
)
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
This commit is contained in:
parent
f1ca2f6a41
commit
b0e3eaae58
1 changed files with 20 additions and 0 deletions
|
@ -781,6 +781,26 @@ locale
|
||||||
``locale.getpreferredencoding(False)`` but ignores the
|
``locale.getpreferredencoding(False)`` but ignores the
|
||||||
:ref:`Python UTF-8 Mode <utf8-mode>`.
|
: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
|
math
|
||||||
----
|
----
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue