Pandu E POLUAN <pepol...@gmail.com> added the comment:
Will patching smtplib.SMTP._print_debug do? You can subclass from smtplib.SMTP this way: class MySMTPClient(smtplib.SMTP): def __init__(self, *args, logger=None, **kwargs): super().__init__(*args, **kwargs) self.logger = logger def _print_debug(self, *args): if self.logger: self.logger.debug(" ".join(args)) super()._print_debug(*args) ---------- nosy: +pepoluan _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue41868> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com