Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Call stack logs should be emitted at TRACE level #38

Open
EliAndrewC opened this issue Sep 14, 2016 · 0 comments
Open

Call stack logs should be emitted at TRACE level #38

EliAndrewC opened this issue Sep 14, 2016 · 0 comments

Comments

@EliAndrewC
Copy link
Contributor

Moved here from the (now private) original Sideboard issue tracker.

One of the cool things that pytest does is when an exception occurs in a unit test, it can spit out a complete call stack. Not just a stack trace, but even all of the local variables that exist at every step of the stack.

This is probably something we can pull out of pytest and use for Sideboard exceptions. This is WAY too verbose to be turned on by default, not to mention dangerous in terms of possibly logging passwords in memory and such. But it would be super-useful to have the option. One way to do this would be to do the logging at TRACE level so that even DEBUG wouldn't get it.

Even if we can't pull it out of pytest, it wouldn't be that hard to implement using the same introspection tools they're using. The trick would be making it compatible with both Python 2 and 3 and ideally turning it off for non-CPython interpreters such as Jython or IronPython where sys._getframe might not be available.

@EliAndrewC EliAndrewC changed the title Call stack logs should be emitted at TRACE leve Call stack logs should be emitted at TRACE level Sep 14, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant