@@ -439,7 +439,7 @@ Handler Objects
439
439
440
440
Handlers have the following attributes and methods. Note that :class: `Handler `
441
441
is never instantiated directly; this class acts as a base for more useful
442
- subclasses. However, the :meth: `__init__ ` method in subclasses needs to call
442
+ subclasses. However, the :meth: `! __init__ ` method in subclasses needs to call
443
443
:meth: `Handler.__init__ `.
444
444
445
445
.. class :: Handler
@@ -1015,23 +1015,25 @@ information into logging calls. For a usage example, see the section on
1015
1015
'extra'. The return value is a (*msg *, *kwargs *) tuple which has the
1016
1016
(possibly modified) versions of the arguments passed in.
1017
1017
1018
- In addition to the above, :class: `LoggerAdapter ` supports the following
1019
- methods of :class: `Logger `: :meth: `~Logger.debug `, :meth: `~Logger.info `,
1020
- :meth: `~Logger.warning `, :meth: `~Logger.error `, :meth: `~Logger.exception `,
1021
- :meth: `~Logger.critical `, :meth: `~Logger.log `, :meth: `~Logger.isEnabledFor `,
1022
- :meth: `~Logger.getEffectiveLevel `, :meth: `~Logger.setLevel ` and
1023
- :meth: `~Logger.hasHandlers `. These methods have the same signatures as their
1024
- counterparts in :class: `Logger `, so you can use the two types of instances
1025
- interchangeably.
1018
+ In addition to the above, :class: `LoggerAdapter ` supports the following
1019
+ methods of :class: `Logger `: :meth: `~Logger.debug `, :meth: `~Logger.info `,
1020
+ :meth: `~Logger.warning `, :meth: `~Logger.error `, :meth: `~Logger.exception `,
1021
+ :meth: `~Logger.critical `, :meth: `~Logger.log `, :meth: `~Logger.isEnabledFor `,
1022
+ :meth: `~Logger.getEffectiveLevel `, :meth: `~Logger.setLevel ` and
1023
+ :meth: `~Logger.hasHandlers `. These methods have the same signatures as their
1024
+ counterparts in :class: `Logger `, so you can use the two types of instances
1025
+ interchangeably.
1026
1026
1027
- .. versionchanged :: 3.2
1028
- The :meth: `~Logger.isEnabledFor `, :meth: `~Logger.getEffectiveLevel `,
1029
- :meth: `~Logger.setLevel ` and :meth: `~Logger.hasHandlers ` methods were added
1030
- to :class: `LoggerAdapter `. These methods delegate to the underlying logger.
1027
+ .. versionchanged :: 3.2
1028
+
1029
+ The :meth: `~Logger.isEnabledFor `, :meth: `~Logger.getEffectiveLevel `,
1030
+ :meth: `~Logger.setLevel ` and :meth: `~Logger.hasHandlers ` methods were added
1031
+ to :class: `LoggerAdapter `. These methods delegate to the underlying logger.
1032
+
1033
+ .. versionchanged :: 3.6
1031
1034
1032
- .. versionchanged :: 3.6
1033
- Attribute :attr: `manager ` and method :meth: `_log ` were added, which
1034
- delegate to the underlying logger and allow adapters to be nested.
1035
+ Attribute :attr: `!manager ` and method :meth: `!_log ` were added, which
1036
+ delegate to the underlying logger and allow adapters to be nested.
1035
1037
1036
1038
1037
1039
Thread Safety
@@ -1415,8 +1417,8 @@ functions.
1415
1417
.. function :: setLoggerClass(klass)
1416
1418
1417
1419
Tells the logging system to use the class *klass * when instantiating a logger.
1418
- The class should define :meth: `__init__ ` such that only a name argument is
1419
- required, and the :meth: `__init__ ` should call :meth: `Logger.__init__ `. This
1420
+ The class should define :meth: `! __init__ ` such that only a name argument is
1421
+ required, and the :meth: `! __init__ ` should call :meth: `! Logger.__init__ `. This
1420
1422
function is typically called before any loggers are instantiated by applications
1421
1423
which need to use custom logger behavior. After this call, as at any other
1422
1424
time, do not instantiate loggers directly using the subclass: continue to use
0 commit comments