log: write only errors on stderr

Previously the logging system wrote all the messages
to the standard error.

Now only errors are logged to the standard error, all the
other message are logged to standard output.

Also addresses minor pep8 issues preventing make check
to exit with success.

Bug-Url: https://bugzilla.redhat.com/956518
Change-Id: Iee176b539dc7bcecc64b26e3c05db7c8a7ee86d6
Signed-off-by: Sandro Bonazzola <sbonazzo@redhat.com>