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 b43a959 commit ab3c215
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 ab3c215

Please sign in to comment.