Skip to content

Commit 888bb58

Browse files
committed
feat: more logging
1 parent bba57c3 commit 888bb58

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

‎faststream/_internal/endpoint/subscriber/supervisor.py‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,15 @@ def is_disabled(self) -> bool:
4545
return bool(int(os.getenv("FASTSTREAM_SUPERVISOR_DISABLED", "0")))
4646

4747
def __call__(self, task: Task[Any]) -> None:
48+
logger.info(f"callback for {task.get_name()} is being executed...")
4849
if task.cancelled() or self.is_disabled:
4950
return
5051

5152
if (exc := task.exception()) and not isinstance(exc, self.ignored_exceptions):
5253
logger.error(
53-
f"{task.get_name()} raised an exception, retrying...", exc_info=exc
54+
f"{task.get_name()} raised an exception, retrying...\n"
55+
"If this behavior causes issues, you can disable it via setting the FASTSTREAM_SUPERVISOR_DISABLED env to 1. "
56+
"Also, please consider opening issue on the repository: https://github.com/ag2ai/faststream.",
57+
exc_info=exc,
5458
)
5559
self.subscriber.add_task(self.func, self.args, self.kwargs)

0 commit comments

Comments
 (0)