Skip to content

Conversation

@anothergituser
Copy link

When you want to pretty print your object, instead of doing logging.debug(myobj) you can do
logging.debug(pprint.pformat(myobj)). One problem, pprint uses a space char to indent and that won't work in html, so i added a filter called nbspindent that replaces the spaces created by pprint with   so it's proper indented.

@aaugustin
Copy link
Contributor

Indentation works best with monospaced fonts. I'd prefer to wrap the output in a <code> tag, like I did in 982f341.

@aaugustin
Copy link
Contributor

Looking at this again today, I'm not sure we want to make changes. Log messages shouldn't contain newlines; that breaks many expectations (eg. grep). Switching to a monospaced font doesn't look very good.

@aaugustin aaugustin closed this Nov 1, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants