Skip to content

Commit

Permalink
refactor(middlware): don't display INFO logs for system task start
Browse files Browse the repository at this point in the history
  • Loading branch information
fubuloubu authored and johnson2427 committed Oct 9, 2024
1 parent afa9b76 commit b5d0a30
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion silverback/middlewares.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,12 @@ def pre_execute(self, message: TaskiqMessage) -> TaskiqMessage:
message.labels["transaction_hash"] = log.transaction_hash
message.labels["log_index"] = str(log.log_index)

logger.info(f"{self._create_label(message)} - Started")
msg = f"{self._create_label(message)} - Started"
if message.task_name.startswith("system:"):
logger.debug(msg)
else:
logger.info(msg)

return message

def post_execute(self, message: TaskiqMessage, result: TaskiqResult):
Expand Down

0 comments on commit b5d0a30

Please sign in to comment.