Skip to content

send notifications to stderr. use colorization on stdout or stderr only if a tty.#495

Merged
inclement merged 1 commit into
kivy:masterfrom
denys-duchier:fix-logging-to-stderr
Nov 24, 2015
Merged

send notifications to stderr. use colorization on stdout or stderr only if a tty.#495
inclement merged 1 commit into
kivy:masterfrom
denys-duchier:fix-logging-to-stderr

Conversation

@denys-duchier
Copy link
Copy Markdown
Contributor

This patch sends log messages to stderr. See e.g. the url below for why that's preferable:

http://www.jstorimer.com/blogs/workingwithcode/7766119-when-to-use-stderr-instead-of-stdout

basically stdout is for primary data, and stderr for ancillary data (erros, notifications, ...), and this separation plays well with combining processes using pipes. It improves on my previous patch in that log info when calling p4a from buildozer will no longer be thrown away.

I also modified colorization, whether on stdout or stderr, to happen only when the corresponding stream is a tty.

@inclement
Copy link
Copy Markdown
Member

Great, thanks :)

inclement added a commit that referenced this pull request Nov 24, 2015
send notifications to stderr. use colorization on stdout or stderr only if a tty.
@inclement inclement merged commit a30fc53 into kivy:master Nov 24, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants