@@ -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
@@ -1019,30 +1019,34 @@ information into logging calls. For a usage example, see the section on
1019
1019
'extra'. The return value is a (*msg *, *kwargs *) tuple which has the
1020
1020
(possibly modified) versions of the arguments passed in.
1021
1021
1022
- In addition to the above, :class: `LoggerAdapter ` supports the following
1023
- methods of :class: `Logger `: :meth: `~Logger.debug `, :meth: `~Logger.info `,
1024
- :meth: `~Logger.warning `, :meth: `~Logger.error `, :meth: `~Logger.exception `,
1025
- :meth: `~Logger.critical `, :meth: `~Logger.log `, :meth: `~Logger.isEnabledFor `,
1026
- :meth: `~Logger.getEffectiveLevel `, :meth: `~Logger.setLevel ` and
1027
- :meth: `~Logger.hasHandlers `. These methods have the same signatures as their
1028
- counterparts in :class: `Logger `, so you can use the two types of instances
1029
- interchangeably.
1022
+ In addition to the above, :class: `LoggerAdapter ` supports the following
1023
+ methods of :class: `Logger `: :meth: `~Logger.debug `, :meth: `~Logger.info `,
1024
+ :meth: `~Logger.warning `, :meth: `~Logger.error `, :meth: `~Logger.exception `,
1025
+ :meth: `~Logger.critical `, :meth: `~Logger.log `, :meth: `~Logger.isEnabledFor `,
1026
+ :meth: `~Logger.getEffectiveLevel `, :meth: `~Logger.setLevel ` and
1027
+ :meth: `~Logger.hasHandlers `. These methods have the same signatures as their
1028
+ counterparts in :class: `Logger `, so you can use the two types of instances
1029
+ interchangeably.
1030
1030
1031
- .. versionchanged :: 3.2
1032
- The :meth: `~Logger.isEnabledFor `, :meth: `~Logger.getEffectiveLevel `,
1033
- :meth: `~Logger.setLevel ` and :meth: `~Logger.hasHandlers ` methods were added
1034
- to :class: `LoggerAdapter `. These methods delegate to the underlying logger.
1031
+ .. versionchanged :: 3.2
1032
+
1033
+ The :meth: `~Logger.isEnabledFor `, :meth: `~Logger.getEffectiveLevel `,
1034
+ :meth: `~Logger.setLevel ` and :meth: `~Logger.hasHandlers ` methods were added
1035
+ to :class: `LoggerAdapter `. These methods delegate to the underlying logger.
1036
+
1037
+ .. versionchanged :: 3.6
1035
1038
1036
- .. versionchanged :: 3.6
1037
- Attribute :attr: `manager ` and method :meth: `_log ` were added, which
1038
- delegate to the underlying logger and allow adapters to be nested.
1039
+ Attribute :attr: `!manager ` and method :meth: `!_log ` were added, which
1040
+ delegate to the underlying logger and allow adapters to be nested.
1039
1041
1040
- .. versionchanged :: 3.13
1041
- Remove the undocumented ``warn() `` method which was an alias to the
1042
- ``warning() `` method.
1042
+ .. versionchanged :: 3.13
1043
+
1044
+ Remove the undocumented :meth: `!warn` ` method which was an alias to the
1045
+ :meth: `!warning ` method.
1046
+
1047
+ .. versionchanged :: 3.13
1043
1048
1044
- .. versionchanged :: 3.13
1045
- The *merge_extra * argument was added.
1049
+ The *merge_extra * argument was added.
1046
1050
1047
1051
1048
1052
Thread Safety
@@ -1430,8 +1434,8 @@ functions.
1430
1434
.. function :: setLoggerClass(klass)
1431
1435
1432
1436
Tells the logging system to use the class *klass * when instantiating a logger.
1433
- The class should define :meth: `__init__ ` such that only a name argument is
1434
- required, and the :meth: `__init__ ` should call :meth: `Logger.__init__ `. This
1437
+ The class should define :meth: `! __init__ ` such that only a name argument is
1438
+ required, and the :meth: `! __init__ ` should call :meth: `! Logger.__init__ `. This
1435
1439
function is typically called before any loggers are instantiated by applications
1436
1440
which need to use custom logger behavior. After this call, as at any other
1437
1441
time, do not instantiate loggers directly using the subclass: continue to use
0 commit comments