Identify the gerrit source when logging stream-events errors.

Was found to be useful while troubleshooting.

Change-Id: I363afc0f8c5044967d30a75b591b634ecd423443
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
This commit is contained in:
Paul Vinciguerra 2019-01-28 12:37:50 -05:00
parent f019543ce9
commit 680dd1a663
1 changed files with 2 additions and 1 deletions

View File

@ -269,7 +269,8 @@ class GerritWatcher(threading.Thread):
if ret and ret not in [-1, 130]:
raise Exception("Gerrit error executing stream-events")
except Exception:
self.log.exception("Exception on ssh event stream:")
self.log.exception("Exception on ssh event stream with %s:",
self.gerrit_connection.connection_name)
time.sleep(5)
finally:
# If we don't close on exceptions to connect we can leak the