mirror of
https://github.com/python/cpython.git
synced 2025-12-08 06:10:17 +00:00
[3.13] gh-137985: Correct description of Formatter's datefmt param in logging documentation (GH-138530) (GH-138566)
(cherry picked from commit 8368895049)
Co-authored-by: W. H. Wang <mattwang44@gmail.com>
This commit is contained in:
parent
cf62144f45
commit
bb64bc357f
1 changed files with 2 additions and 3 deletions
|
|
@ -671,8 +671,7 @@ Formatter Objects
|
||||||
which is just the logged message.
|
which is just the logged message.
|
||||||
:type fmt: str
|
:type fmt: str
|
||||||
|
|
||||||
:param datefmt: A format string in the given *style* for
|
:param datefmt: A format string for the date/time portion of the logged output.
|
||||||
the date/time portion of the logged output.
|
|
||||||
If not specified, the default described in :meth:`formatTime` is used.
|
If not specified, the default described in :meth:`formatTime` is used.
|
||||||
:type datefmt: str
|
:type datefmt: str
|
||||||
|
|
||||||
|
|
@ -680,7 +679,7 @@ Formatter Objects
|
||||||
how the format string will be merged with its data: using one of
|
how the format string will be merged with its data: using one of
|
||||||
:ref:`old-string-formatting` (``%``), :meth:`str.format` (``{``)
|
:ref:`old-string-formatting` (``%``), :meth:`str.format` (``{``)
|
||||||
or :class:`string.Template` (``$``). This only applies to
|
or :class:`string.Template` (``$``). This only applies to
|
||||||
*fmt* and *datefmt* (e.g. ``'%(message)s'`` versus ``'{message}'``),
|
*fmt* (e.g. ``'%(message)s'`` versus ``'{message}'``),
|
||||||
not to the actual log messages passed to the logging methods.
|
not to the actual log messages passed to the logging methods.
|
||||||
However, there are :ref:`other ways <formatting-styles>`
|
However, there are :ref:`other ways <formatting-styles>`
|
||||||
to use ``{``- and ``$``-formatting for log messages.
|
to use ``{``- and ``$``-formatting for log messages.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue