Repository navigation
Commit aa53cd9
authored
Restore the log depth counter when an aborted logging cycle returns early (#2072)
The infinite loop guard in Logger::addRecord() incremented the depth
counter and then returned before the try/finally that decrements it.
Every aborted cycle therefore left the counter raised: after the first
one it stayed at 3, the next nested record pushed it to 5, and from then
on the logger silently dropped every record for the rest of the process.
Long-running workers are hit hardest. Legitimate nesting (e.g. a handler
whose synchronous HTTP call runs the shared Guzzle promise queue, which
in turn runs callbacks that log) trips the guard once, and the process
never logs again until it is restarted.
Moving the guard inside the try block makes the early returns run the
same finally as every other exit.1 parent d94b61e commit aa53cd9
2 files changed
Lines changed: 21 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
353 | 353 | | |
354 | 354 | | |
355 | 355 | | |
356 | | - | |
357 | | - | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
358 | 359 | | |
359 | | - | |
360 | | - | |
361 | | - | |
362 | | - | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
363 | 364 | | |
364 | | - | |
365 | 365 | | |
366 | 366 | | |
367 | 367 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1052 | 1052 | | |
1053 | 1053 | | |
1054 | 1054 | | |
| 1055 | + | |
| 1056 | + | |
| 1057 | + | |
| 1058 | + | |
| 1059 | + | |
| 1060 | + | |
| 1061 | + | |
| 1062 | + | |
| 1063 | + | |
| 1064 | + | |
| 1065 | + | |
| 1066 | + | |
| 1067 | + | |
| 1068 | + | |
1055 | 1069 | | |
1056 | 1070 | | |
1057 | 1071 | | |
| |||
0 commit comments