Skip to content

Commit 9b56759

Browse files
authored
Add 'task:' label to exception handler log messages (home-assistant#158674)
1 parent c3f743c commit 9b56759

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

homeassistant/runner.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ def _async_loop_exception_handler(
227227
if source_traceback := context.get("source_traceback"):
228228
stack_summary = "".join(traceback.format_list(source_traceback))
229229
logger.error(
230-
"Error doing job: %s (%s): %s",
230+
"Error doing job: %s (task: %s): %s",
231231
context["message"],
232232
context.get("task"),
233233
stack_summary,
@@ -236,7 +236,7 @@ def _async_loop_exception_handler(
236236
return
237237

238238
logger.error(
239-
"Error doing job: %s (%s)",
239+
"Error doing job: %s (task: %s)",
240240
context["message"],
241241
context.get("task"),
242242
**kwargs, # type: ignore[arg-type]

0 commit comments

Comments
 (0)