Commit 3aa7346
fix(logging): tag keboola-owned handlers; only remove those in set_default_logger
set_default_logger and set_gelf_logger iterated root.handlers while calling
removeHandler in the same loop body, causing mutation-during-iteration skips
(alternating handlers were missed). More importantly, all handlers were removed
indiscriminately, dropping any test-infrastructure handlers (e.g. LogCaptureHandler
from keboola.vcr) that were installed before the component initialised.
Fix: mark handlers created by keboola.component with _keboola_owned = True and
only remove those. External handlers installed by test frameworks survive
set_default_logger calls.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 4dd9894 commit 3aa7346
1 file changed
+17
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
165 | 165 | | |
166 | 166 | | |
167 | 167 | | |
| 168 | + | |
168 | 169 | | |
169 | 170 | | |
| 171 | + | |
170 | 172 | | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
177 | 182 | | |
178 | | - | |
179 | | - | |
| 183 | + | |
180 | 184 | | |
181 | 185 | | |
182 | 186 | | |
| |||
196 | 200 | | |
197 | 201 | | |
198 | 202 | | |
199 | | - | |
200 | | - | |
201 | | - | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
202 | 208 | | |
203 | 209 | | |
204 | 210 | | |
| |||
0 commit comments