Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: lazy logging incompatible with MultiEmailHandler? #84

Open
rderooy opened this issue Sep 5, 2023 · 0 comments
Open

BUG: lazy logging incompatible with MultiEmailHandler? #84

rderooy opened this issue Sep 5, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@rderooy
Copy link

rderooy commented Sep 5, 2023

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:

  1. Use lazy logging function
  2. 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
@rderooy rderooy added the bug Something isn't working label Sep 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant