mirror of
https://github.com/python/cpython.git
synced 2025-11-03 03:22:27 +00:00
Merge with 3.2.
This commit is contained in:
commit
86798d4ff9
1 changed files with 2 additions and 4 deletions
|
|
@ -1094,7 +1094,7 @@ call to one of the XXXMessage classes.
|
||||||
|
|
||||||
.. currentmodule:: logging
|
.. currentmodule:: logging
|
||||||
|
|
||||||
.. custom-logrecord:
|
.. _custom-logrecord:
|
||||||
|
|
||||||
Customising ``LogRecord``
|
Customising ``LogRecord``
|
||||||
-------------------------
|
-------------------------
|
||||||
|
|
@ -1134,9 +1134,7 @@ The second approach works reasonably well for many cases, but does not allow
|
||||||
you to e.g. use a specialized subclass of :class:`LogRecord`. Library
|
you to e.g. use a specialized subclass of :class:`LogRecord`. Library
|
||||||
developers can set a suitable filter on their loggers, but they would have to
|
developers can set a suitable filter on their loggers, but they would have to
|
||||||
remember to do this every time they introduced a new logger (which they would
|
remember to do this every time they introduced a new logger (which they would
|
||||||
do simply by adding new packages or modules and doing
|
do simply by adding new packages or modules and doing ::
|
||||||
|
|
||||||
.. code-block:: python
|
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue