Add `template` to record
template contains the raw, unformatted message body before any colorization or interpolation is applied. Useful for structured logging tools/visualizers like Sentry.
Hope I covered everything -- I'm available for changes if anything is off. 🙏🏻
Ref https://github.com/Delgan/loguru/issues/1349
Hey! Thank you very much for the PR. Sorry, once again, for the delay...
I'm just wondering: don't you also need *args (and **kwargs to a lesser extent) to be accessible in the template?
I'm thinking it could fix #1344 at the same time.
Heyo, no worries, thanks for getting back to me. 🙏🏻
I'm just wondering: don't you also need
*args(and**kwargsto a lesser extent) to be accessible in the template? I'm thinking it could fix https://github.com/Delgan/loguru/issues/1344 at the same time.
That would be ideal, but wasn't sure if it was ok from your POV (in the original issue you only mentioned adding the template, so I assumed you wouldn't add the args/kwargs).
Happy to add it to the PR. What's the best way to go about it?
- Add
args(and potentiallykwargs) additionally on the record alongsidetemplate - Make
templatea simple class withargs,kwargs, andrawas attributes
Just from looking at the existing code, 2. would probably fit nicely?