Skip to content

Indentation for logging message when the dump is an object #371

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

Closed
wants to merge 1 commit into from
Closed

Indentation for logging message when the dump is an object #371

wants to merge 1 commit into from

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