Commit f04393c
authored
Only call handle method on multihandler inner handler if enabled (#43613)
### What does this PR do?
Update `MultiHandler` to only call a inner handler's `Handle` method if this `Handler` is enabled.
### Motivation
The [documentation](https://pkg.go.dev/log/slog#Handler) of the `Handle` method explicitly says that the method should only be called when enabled.
```
// Handle handles the Record.
// It will only be called when Enabled returns true.
```
### Describe how you validated your changes
CI
### Additional Notes
Co-authored-by: pierre.gimalac <[email protected]>1 parent 69a1798 commit f04393c
2 files changed
+26
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
36 | | - | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
37 | 39 | | |
38 | 40 | | |
39 | 41 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
223 | 223 | | |
224 | 224 | | |
225 | 225 | | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
0 commit comments