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
Some frameworks/libraries produce very long stacks. Loguru already highlights the user frames using colors. I'd like to be able to hide framework frames altogether.
I'd be happy to implement this using a custom ExceptionFormatter. I think the right place would be to extend _extract_frames().is_valid(). Would you be open for a PR that makes it possible to overwrite this function without copying all of the code?
If we wanted to go a step further we could even make this an official feature: Given a list of files or modules, Loguru skips those when printing exceptions.
The text was updated successfully, but these errors were encountered:
The problem is that currently, ExceptionFormatter isn't publicly available. The class can surely be extended, but you would still need to import it from a private Loguru's module. :/
However, as there have been several features requests to improve exception formatting, I'm considering making it more easily configurable. Then, we could seamlessly add the ability to skip frames. I've not yet defined the final API, though.
In the meantime, are you interested in a tiny PR to make overwriting frame selection possible? Even if it's using internal modules, better than nothing.
In the meantime, are you interested in a tiny PR to make overwriting frame selection possible? Even if it's using internal modules, better than nothing.
Some frameworks/libraries produce very long stacks. Loguru already highlights the user frames using colors. I'd like to be able to hide framework frames altogether.
I'd be happy to implement this using a custom
ExceptionFormatter
. I think the right place would be to extend_extract_frames().is_valid()
. Would you be open for a PR that makes it possible to overwrite this function without copying all of the code?If we wanted to go a step further we could even make this an official feature: Given a list of files or modules, Loguru skips those when printing exceptions.
The text was updated successfully, but these errors were encountered: