mirror of
https://github.com/simple-login/app.git
synced 2025-02-23 23:34:05 +08:00
add more logging
This commit is contained in:
parent
3b850f6228
commit
0df4d1a93d
2 changed files with 4 additions and 1 deletions
|
@ -1398,6 +1398,9 @@ class EmailLog(db.Model, ModelMixin):
|
|||
else:
|
||||
return "forward"
|
||||
|
||||
def __repr__(self):
|
||||
return f"<EmailLog {self.id}>"
|
||||
|
||||
|
||||
class Subscription(db.Model, ModelMixin):
|
||||
"""Paddle subscription"""
|
||||
|
|
|
@ -1655,7 +1655,7 @@ def get_spam_score(message: Message, email_log: EmailLog) -> float:
|
|||
# wait for at max 300s which is the default spamd timeout-child
|
||||
sa = SpamAssassin(sa_input, host=SPAMASSASSIN_HOST, timeout=300)
|
||||
score = sa.get_score()
|
||||
LOG.d("SA report, score %s. %s", score, sa.get_report_json())
|
||||
LOG.d("SA report for %s, score %s. %s", email_log, score, sa.get_report_json())
|
||||
return score
|
||||
except Exception:
|
||||
LOG.exception("SpamAssassin exception")
|
||||
|
|
Loading…
Reference in a new issue