Closed Schnouki closed 2 years ago
You should consider forking this repo.
I have the same needs. Certain variables and dictionary fields in my software contain full blown URLs. I already feed them through a function of mine that redact the passwords, but they are now creeping up in these stack traces. @Schnouki what did you end up doing?
Try pip install -U stackprinter
: I just pushed the new version 0.2.6 to pypi which brings an option to redact variables, using stackprinter.format(suppressed_vars=[r".*token.*", r".*secret"])
) etc
feel free to reopen if it doesn't fully adress the issue!
Hey there,
I'm considering using stackprinter at my company to help with some debugging tasks. Its output would be in our logs, and thus be sent to DataDog. But we don't really want to do that unless we have more control over the output.
More specifically: we want to redact some variables based on their name, because they can contain sensitive user data. For instance,
content
or*_token
are replaced by "**" in our current system and in Sentry, and I'd like to do the same with stackprinter.Is there already a way to do that? If not, what would be a good way to add such a filter?
Thanks!