Maybe stderr.strip() or stderr.rstrip() will get a good format for logging :)