-
Notifications
You must be signed in to change notification settings - Fork 136
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
Ability to customize how objects are repr()'d #67
Comments
Thanks for starting the convo, Brian. I would probably expose a new configuration option that would allow the user to provide a function that would be used instead of e.g. # Ordered list of serializers. The first regex pattern that
# matches the object being serialized will be used.
# If none of the user-supplied patterns match, the default
# reprlib.repr() serializer will be used.
serializers = [
('class_name_regex_pattern', my_custom_serializer_fn)
('*', reprlib.repr)
] |
+1 as is. It might be nice to support a |
We need to make sure the solution to this addresses the problem that this pull request attempted to address. #91 |
Hi there, I’m closing out all issues opened before 2018 that haven’t had any activity on them since the start of this year. If this is still an issue for you, please comment here and we can reopen this. Thanks! |
Would be nice to have this option! |
Another option here could be to use devtools for formatting. |
pyrollbar uses reprlib to get representations of objects gathered as local variables. This means that to customize it, the only current option is to define/override
__repr__
. That isn't a good option in some cases, including:__repr__
implementationCreating this issue to discuss the design for how to make this customizable.
The text was updated successfully, but these errors were encountered: