patch_logger: fix func name when it's a method
fix patching flask_mail