diff --git a/intelmq/bots/outputs/smtp_batch/output.py b/intelmq/bots/outputs/smtp_batch/output.py index 66568f259..f1277af18 100644 --- a/intelmq/bots/outputs/smtp_batch/output.py +++ b/intelmq/bots/outputs/smtp_batch/output.py @@ -238,7 +238,7 @@ def prepare_mails(self): continue else: # visible both warning and print - self.logger.warning(f"Warning: %s timeout, too big to read from redis", mail_record) + self.logger.warning("Warning: timeout, too big to read from redis: %r", mail_record) self.timeout.append(mail_record) continue @@ -256,7 +256,7 @@ def prepare_mails(self): if threshold and row["time.observation"][:19] < threshold.isoformat()[:19]: continue except KeyError: - self.logger.warning(f"Warning: %s row skipped due to time.observation error", mail_record) + self.logger.warning("Warning: row skipped due to time.observation error: %r", mail_record) fieldnames = fieldnames | set(row.keys()) keys = set(self.allowed_fieldnames).intersection(row) ordered_keys = [] @@ -292,7 +292,7 @@ def prepare_mails(self): try: zf.writestr(filename + ".csv", output.getvalue()) except Exception: - self.logger.error(f"Cannot zip mail %s", mail_record) + self.logger.error("Error: Cannot zip mail: %r", mail_record) continue if email_to in self.alternative_mail: