-
Notifications
You must be signed in to change notification settings - Fork 144
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
When saving a traceback, shorten very large locals #3468
base: main
Are you sure you want to change the base?
Conversation
1134196
to
b62b592
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a nitpick about the value, otherwise LGTM
#: Render also call stack for exception and each of its causes, | ||
#: plus all local variables in each frame, trimmed to first 1024 | ||
#: characters of their values. | ||
LOCALS = '2' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why '2' and not 'locals' ? It might be more descriptive, or?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It may, I wanted to have a breathing space for the future, in case we find some new verbosity levels between full
and the rest. full
is easy, it's everything that can be shown, but finding names for verbose-but-not-so-verbose levels is harder. If there's a more verbose level after levels
, how would it be called, and how would a user tell which of those names is the more verbose one? 2
vs 3
would be easy.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lukaszachy pls re-review
b62b592
to
5e7de3f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
/packit test |
A traceback in `log.txt` can be very large, especially when saving locals like a huge set of result or junit XML. Adding a level of traceback verbosity, `locals`, which will log locals, but shorten the very long ones. `full` will keep showing everything on terminal.
5e7de3f
to
769d50b
Compare
A traceback in
log.txt
can be very large, especially when saving locals like a huge set of result or junit XML. Adding a level of traceback verbosity,locals
, which will log locals, but shorten the very long ones.full
will keep showing everything on terminal.Pull Request Checklist