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

feature: limit printed traceback lines #77

Closed
Fak3 opened this issue Mar 31, 2019 · 2 comments
Closed

feature: limit printed traceback lines #77

Fak3 opened this issue Mar 31, 2019 · 2 comments
Labels
feature Request for adding a new feature

Comments

@Fak3
Copy link

Fak3 commented Mar 31, 2019

If handler backtrace is True, the output traceback is very long. Especially for async functions - more than a hundred of lines come from the event loop, and clutter the output (example: https://gist.github.com/Fak3/81cf8554414e2d82cfcad93294f3e981)

It would be nice to have a way to limit number of backtrace lines printed, like sys.tracebacklimit = 3 does.

@Delgan Delgan added the enhancement Improvement to an already existing feature label Mar 31, 2019
@Delgan
Copy link
Owner

Delgan commented Mar 31, 2019

In the next v0.3.0 release, you should be able to set backtrace=False to reduce the size of the traceback, a new parameter diagnose will allow to independently control whether or not the variable values should be displayed. 👍

I was not aware of sys.tracebacklimit, I think the printed exceptions should actually make use of this value.

@Delgan Delgan added feature Request for adding a new feature and removed enhancement Improvement to an already existing feature labels Apr 6, 2019
@Delgan
Copy link
Owner

Delgan commented Apr 6, 2019

Starting from v0.3.0, the exception formatting will rely on the sys.tracebacklimit variable to determine the depth of the stacktrace to display.

Also, note that adding an handler with backtrace=False should drastically reduce the number of frames displayed.

@Delgan Delgan closed this as completed Apr 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Request for adding a new feature
Projects
None yet
Development

No branches or pull requests

2 participants