@@ -77,6 +77,27 @@ is the module's name in the Python package namespace.
77
77
78
78
.. class :: Logger
79
79
80
+ .. attribute :: Logger.name
81
+
82
+ This is the logger's name, and is the value that was passed to :func: `getLogger `
83
+ to obtain the logger.
84
+
85
+ .. note :: This attribute should be treated as read-only.
86
+
87
+ .. attribute :: Logger.level
88
+
89
+ The threshold of this logger, as set by the :meth: `setLevel ` method.
90
+
91
+ .. note :: Do not set this attribute directly - always use :meth:`setLevel`,
92
+ which has checks for the level passed to it.
93
+
94
+ .. attribute :: Logger.parent
95
+
96
+ The parent logger of this logger. It may change based on later instantiation
97
+ of loggers which are higher up in the namespace hierarchy.
98
+
99
+ .. note :: This value should be treated as read-only.
100
+
80
101
.. attribute :: Logger.propagate
81
102
82
103
If this attribute evaluates to true, events logged to this logger will be
@@ -108,6 +129,21 @@ is the module's name in the Python package namespace.
108
129
scenario is to attach handlers only to the root logger, and to let
109
130
propagation take care of the rest.
110
131
132
+ .. attribute :: Logger.handlers
133
+
134
+ The list of handlers directly attached to this logger instance.
135
+
136
+ .. note :: This attribute should be treated as read-only; it is normally changed via
137
+ the :meth: `addHandler ` and :meth: `removeHandler ` methods, which use locks to ensure
138
+ thread-safe operation.
139
+
140
+ .. attribute :: Logger.disabled
141
+
142
+ This attribute disables handling of any events. It is set to ``False `` in the
143
+ initializer, and only changed by logging configuration code.
144
+
145
+ .. note :: This attribute should be treated as read-only.
146
+
111
147
.. method :: Logger.setLevel(level)
112
148
113
149
Sets the threshold for this logger to *level *. Logging messages which are less
0 commit comments