Add a way to preprocess variables before printing
Hi there,
I've encountered the issue already mentioned in https://github.com/cknd/stackprinter/issues/50. Current implementation doesn’t let me fully hide sensitive data from the logs (dict variables, class representation string, etc).
I'd like to propose adding an optional keyword argument to the show, format, and format_current_stack methods that accepts a Callable. This function would receive each variable as it's being processed, allowing users to apply transformation before it's printed to the console. That way, any custom types can be handled as well.
I'd be happy to work on a PR for this if that's okay with you.
Hi there! Thank you, this sounds like a very good idea, and a nice small PR would be welcome of course