Have logstash be less verbose on 404 errors.
Change-Id: Ie6905039d4752d578566861ffd340cf607ad270b Reviewed-on: https://review.openstack.org/32819 Reviewed-by: Jeremy Stanley <fungi@yuggoth.org> Reviewed-by: Khai Do <zaro0508@gmail.com> Approved: Clark Boylan <clark.boylan@gmail.com> Reviewed-by: Clark Boylan <clark.boylan@gmail.com> Tested-by: Jenkins
This commit is contained in:
parent
5fbf5dd6c1
commit
fa7d1e5e68
@ -95,7 +95,13 @@ class LogRetriever(threading.Thread):
|
|||||||
raw_buf = b''
|
raw_buf = b''
|
||||||
try:
|
try:
|
||||||
gzipped, raw_buf = self._get_log_data(source_url, retry)
|
gzipped, raw_buf = self._get_log_data(source_url, retry)
|
||||||
except:
|
except urllib2.HTTPError, e:
|
||||||
|
if e.code == 404:
|
||||||
|
logging.info("Unable to retrieve %s: HTTP error 404" %
|
||||||
|
source_url)
|
||||||
|
else:
|
||||||
|
logging.exception("Unable to get log data.")
|
||||||
|
except Exception:
|
||||||
# Silently drop fatal errors when retrieving logs.
|
# Silently drop fatal errors when retrieving logs.
|
||||||
# TODO (clarkb): Handle these errors.
|
# TODO (clarkb): Handle these errors.
|
||||||
# Perhaps simply add a log message to raw_buf?
|
# Perhaps simply add a log message to raw_buf?
|
||||||
|
Loading…
x
Reference in New Issue
Block a user