Commit f780a7b
Log exception class+message on token-read errors, traceback at DEBUG
Address review feedback from @bdrx312 on PR #69074: the original
`log.warning` calls in the SaltDeserializationError and OSError
handlers in `LoadAuth.get_tok` did not capture the exception at all,
making troubleshooting harder. Two combined changes:
1. Add the exception class+message inline via `%r` so each
occurrence is one greppable line that names which subclass
(e.g. `ConnectionResetError`) and its message produced the
warning -- enough to triage without a full traceback.
2. Add a companion `log.debug(..., exc_info=True)` per @bdrx312's
suggestion. Operators who need the full traceback for a specific
intermittent failure can raise the level to DEBUG and see it.
Costs nothing at the default WARNING level because logging skips
exc_info formatting when the level is disabled.
This avoids GBs/hour of stack frames during a flapping Redis or NFS
outage (the original `exc_info=True` approach considered earlier)
while keeping full diagnostic depth one log-level change away.
Refs: #690731 parent 7c4d9a1 commit f780a7b
1 file changed
Lines changed: 17 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
243 | 243 | | |
244 | 244 | | |
245 | 245 | | |
246 | | - | |
| 246 | + | |
247 | 247 | | |
248 | 248 | | |
249 | 249 | | |
250 | 250 | | |
251 | | - | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
252 | 257 | | |
253 | | - | |
| 258 | + | |
254 | 259 | | |
| 260 | + | |
255 | 261 | | |
| 262 | + | |
256 | 263 | | |
257 | 264 | | |
258 | | - | |
| 265 | + | |
259 | 266 | | |
260 | 267 | | |
261 | 268 | | |
262 | 269 | | |
263 | 270 | | |
264 | 271 | | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
265 | 275 | | |
266 | | - | |
| 276 | + | |
267 | 277 | | |
268 | 278 | | |
269 | 279 | | |
| 280 | + | |
270 | 281 | | |
| 282 | + | |
271 | 283 | | |
272 | 284 | | |
273 | 285 | | |
| |||
0 commit comments