Handle html log annotations.
* modules/openstack_project/files/logstash/log-gearman-worker.py: The annotated logs served by logs-dev and soon to be served to logs.o.o return .txt files gzipped. log-gearman-worker.py needs to check the Content-Type in the reponse headers to see if the txt files were gzipped in order to properly handle this. partial-bug: #1207047 Change-Id: I5981cde145a572a6e3d20e8369e407df151143ff
This commit is contained in:
parent
c28c8933ab
commit
a20c139f3d
@ -123,6 +123,8 @@ class LogRetriever(threading.Thread):
|
|||||||
try:
|
try:
|
||||||
logging.debug("Retrieving: " + source_url)
|
logging.debug("Retrieving: " + source_url)
|
||||||
r = urllib2.urlopen(source_url)
|
r = urllib2.urlopen(source_url)
|
||||||
|
if 'gzip' in r.info().get('Content-Type', ''):
|
||||||
|
gzipped = True
|
||||||
except urllib2.URLError:
|
except urllib2.URLError:
|
||||||
try:
|
try:
|
||||||
logging.debug("Retrieving: " + source_url + ".gz")
|
logging.debug("Retrieving: " + source_url + ".gz")
|
||||||
|
Loading…
Reference in New Issue
Block a user