Skip to content

BUG: lazy logging incompatible with MultiEmailHandler? #84

@rderooy

Description

@rderooy

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions