@@ -427,7 +427,7 @@ Handler Objects
427
427
428
428
Handlers have the following attributes and methods. Note that :class: `Handler `
429
429
is never instantiated directly; this class acts as a base for more useful
430
- subclasses. However, the :meth: `__init__ ` method in subclasses needs to call
430
+ subclasses. However, the :meth: `! __init__ ` method in subclasses needs to call
431
431
:meth: `Handler.__init__ `.
432
432
433
433
.. class :: Handler
@@ -994,23 +994,25 @@ information into logging calls. For a usage example, see the section on
994
994
'extra'. The return value is a (*msg *, *kwargs *) tuple which has the
995
995
(possibly modified) versions of the arguments passed in.
996
996
997
- In addition to the above, :class: `LoggerAdapter ` supports the following
998
- methods of :class: `Logger `: :meth: `~Logger.debug `, :meth: `~Logger.info `,
999
- :meth: `~Logger.warning `, :meth: `~Logger.error `, :meth: `~Logger.exception `,
1000
- :meth: `~Logger.critical `, :meth: `~Logger.log `, :meth: `~Logger.isEnabledFor `,
1001
- :meth: `~Logger.getEffectiveLevel `, :meth: `~Logger.setLevel ` and
1002
- :meth: `~Logger.hasHandlers `. These methods have the same signatures as their
1003
- counterparts in :class: `Logger `, so you can use the two types of instances
1004
- interchangeably.
997
+ In addition to the above, :class: `LoggerAdapter ` supports the following
998
+ methods of :class: `Logger `: :meth: `~Logger.debug `, :meth: `~Logger.info `,
999
+ :meth: `~Logger.warning `, :meth: `~Logger.error `, :meth: `~Logger.exception `,
1000
+ :meth: `~Logger.critical `, :meth: `~Logger.log `, :meth: `~Logger.isEnabledFor `,
1001
+ :meth: `~Logger.getEffectiveLevel `, :meth: `~Logger.setLevel ` and
1002
+ :meth: `~Logger.hasHandlers `. These methods have the same signatures as their
1003
+ counterparts in :class: `Logger `, so you can use the two types of instances
1004
+ interchangeably.
1005
1005
1006
- .. versionchanged :: 3.2
1007
- The :meth: `~Logger.isEnabledFor `, :meth: `~Logger.getEffectiveLevel `,
1008
- :meth: `~Logger.setLevel ` and :meth: `~Logger.hasHandlers ` methods were added
1009
- to :class: `LoggerAdapter `. These methods delegate to the underlying logger.
1006
+ .. versionchanged :: 3.2
1007
+
1008
+ The :meth: `~Logger.isEnabledFor `, :meth: `~Logger.getEffectiveLevel `,
1009
+ :meth: `~Logger.setLevel ` and :meth: `~Logger.hasHandlers ` methods were added
1010
+ to :class: `LoggerAdapter `. These methods delegate to the underlying logger.
1011
+
1012
+ .. versionchanged :: 3.6
1010
1013
1011
- .. versionchanged :: 3.6
1012
- Attribute :attr: `manager ` and method :meth: `_log ` were added, which
1013
- delegate to the underlying logger and allow adapters to be nested.
1014
+ Attribute :attr: `!manager ` and method :meth: `!_log ` were added, which
1015
+ delegate to the underlying logger and allow adapters to be nested.
1014
1016
1015
1017
1016
1018
Thread Safety
@@ -1381,8 +1383,8 @@ functions.
1381
1383
.. function :: setLoggerClass(klass)
1382
1384
1383
1385
Tells the logging system to use the class *klass * when instantiating a logger.
1384
- The class should define :meth: `__init__ ` such that only a name argument is
1385
- required, and the :meth: `__init__ ` should call :meth: `Logger.__init__ `. This
1386
+ The class should define :meth: `! __init__ ` such that only a name argument is
1387
+ required, and the :meth: `! __init__ ` should call :meth: `! Logger.__init__ `. This
1386
1388
function is typically called before any loggers are instantiated by applications
1387
1389
which need to use custom logger behavior. After this call, as at any other
1388
1390
time, do not instantiate loggers directly using the subclass: continue to use
0 commit comments