red-mail
red-mail copied to clipboard
BUG: lazy logging incompatible with MultiEmailHandler?
Describe the bug An issue I have with the MultiEmailHandler is that my log messages are written to be compliant with lazy logging (pylint warning W1201).
This works fine with the other loggers I use, but breaks with RedMail MultiEmailHandler, where my messages are full of '%s' where variables need to be.
e.g. this breaks RedMail and remains as "%s":
LOG.info("message %s", variable)
But this works:
LOG.info("message " + variable)
To Reproduce Steps to reproduce the behavior:
- Use lazy logging function
- observe email, the %s will not be substituted for the variable
Expected behavior %s to be substituted for the variable, like with other logging functions. Or at least some explanation in the docs about this.
Screenshots If applicable, add screenshots to help explain your problem.
Email provider:
- Email service: private
- Application to view the email: not relevant
Environment (please complete the following information if relevant):
- OS: Linux
- Python version: 3.11
- Red Mail version: 0.6.0