Improvements to the log-pusher script.

* modules/openstack_project/files/logstash/log-pusher.py: Actually wait
for at least one second between log file fetches. time.sleep() may
return early (or immediately) resulting in some log files being missed
as they may not be available immediately. Also, flush sys.stdout after
each log event is written to it to keep downstream consumers up to date.

Change-Id: I9517488bcb440e5f9263ccf8db46ef743d4723f0
Reviewed-on: https://review.openstack.org/27533
Reviewed-by: matthew-wagoner <matthew.wagoner@hp.com>
Approved: Clark Boylan <clark.boylan@gmail.com>
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Tested-by: Jenkins
Add logging support to log-pusher.py.

* modules/openstack_project/files/logstash/log-pusher.py: Add simple
logging support to debug log-pusher.py issues.

Change-Id: I1e7d54ba5dbce51ff1fccc2e11d55a589579bd04
Reviewed-on: https://review.openstack.org/27594
Reviewed-by: James E. Blair <corvus@inaugust.com>
Approved: Clark Boylan <clark.boylan@gmail.com>
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Tested-by: Jenkins
Special case HTTP 416 errors in log-pusher.py.

* modules/openstack_project/files/logstash/log-pusher.py: There is a
race between Jenkins uploading the log file and log-pusher.py requesting
bytes that have not been written to the log file yet. Special case HTTP
416 responses and ignore them as eventually these bytes should be
written to the file.

Change-Id: If67f6f238f1d45179e9bfdd18497a7076bda9324
Reviewed-on: https://review.openstack.org/27599
Reviewed-by: James E. Blair <corvus@inaugust.com>
Approved: Clark Boylan <clark.boylan@gmail.com>
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Tested-by: Jenkins