You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 23, 2023. It is now read-only.
I have a use case where I need to apply formatter to the log messages, that SentryHandler sends to Sentry. In the code it looks like SentryHandles is formatting the message, but, actually the newly formatted message is not saved in the log record.
Formatting works if we change line
You can easily recreate reproduce the problem like this
fromloggingimportFormatterfromraven.handlers.loggingimportSentryHandlersentry_handler=SentryHandler(client=client, level='ERROR')
sentry_handler.setFormatter(Formatter('This is my beautifully formatted message: %(message)s'))
logging.getLogger().addHandler(sentry_handler)
I am ready to send you a pull request for fixing this issue.