sentry-python icon indicating copy to clipboard operation
sentry-python copied to clipboard

Capture Loguru log args as parameters

Open sentrivana opened this issue 6 months ago • 0 comments

Right now the Loguru Sentry logs integration doesn't capture args, kwargs provided to the logger, only the already formatted message. This is because Loguru pre-formats the message and we only have access to the already formatted message in the handler.

We've submitted a feature request to Loguru to potentially get access to the args & kwargs but maybe there's another way to get this to work?

Monkeypatching isn't straightforward because all the logic is in one function and the log record is also created there.

sentrivana avatar Jun 16 '25 11:06 sentrivana