Commit bbffc9e
fix: Resolve LogRecord attribute conflict in event manager logging
The `extra={'message': message}` in the exception handler overwrites
Python's built-in `LogRecord.message` attribute, corrupting the log
record and preventing caplog from capturing it (especially on 3.13+).
Renamed to `raw_message` to avoid the collision.
Also fixed `test_unknown_event_is_logged` which was missing an explicit
`caplog.set_level(logging.INFO)` — the unknown event is logged at INFO
level but caplog only captures WARNING+ by default.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent 8a345bd commit bbffc9e
File tree
2 files changed
+2
-1
lines changed- src/apify/events
- tests/unit/events
2 files changed
+2
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
136 | | - | |
| 136 | + | |
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
264 | 264 | | |
265 | 265 | | |
266 | 266 | | |
| 267 | + | |
267 | 268 | | |
268 | 269 | | |
269 | 270 | | |
| |||
0 commit comments