You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be good to have an option to pretty-print dictionaries, i.e. with indentation in the logs for better examination. Robot already pretty-prints dict return values in the log (when using TRACE option), so suggest to offer this also when doing it from keyword (maybe with an indent=<int> option which would then just do a json.dumps(dict, indent=indent) if set.
Happy to provide a PR to do this in 7.1
The text was updated successfully, but these errors were encountered:
oboehmer
changed the title
prett-printy Log Dictionary option
pretty-printy Log Dictionary option
Mar 15, 2024
Doesn't the formatter=repr option from the BuiltIn Log keyword already provide the requested feature?
When using repr, bigger lists, dictionaries and other containers are also pretty-printed so that there is one item per row. For more details see String representations.
It would be good to have an option to pretty-print dictionaries, i.e. with indentation in the logs for better examination. Robot already pretty-prints dict return values in the log (when using TRACE option), so suggest to offer this also when doing it from keyword (maybe with an
indent=<int>
option which would then just do a json.dumps(dict, indent=indent) if set.Happy to provide a PR to do this in 7.1
The text was updated successfully, but these errors were encountered: