loguru
loguru copied to clipboard
Hide Sensitive Information from Exception Traceback
While there are ways to mask / scrub sensitive information from message as mentioned in https://github.com/Delgan/loguru/issues/17
There should also be ways to mask / scrub sensitive information in exception traceback.
You can do so by implementing a custom exception formatting and/or disabling diagnose option: Customizing the formatting of exceptions.
So, we are saying that the only option is to set diagose=False?
Disabling diagnose would stop printing all the values, even the ones which were not sensitive and useful.
It would be great if we can selectively disable some classes during diagnosis or configure a regex based replacement which is currently available for messages.
There is currently no "regex based replacement" available for messages. One has to implement it's own filtering handler as described in the ticket you linked. I'm suggesting to do the same with a custom exception formatter. :+1: