diff options
author | James E. Blair <jeblair@redhat.com> | 2019-02-06 08:11:35 -0800 |
---|---|---|
committer | James E. Blair <jeblair@redhat.com> | 2019-02-06 08:12:33 -0800 |
commit | 36c06e0bb4eebbdebfdf0f9f10def4e63562b6c5 (patch) | |
tree | 88878e6fabcb432dc5700b56d55009e674da59cc | |
parent | 9019158139c433679d82e88de23c248206aab9e3 (diff) |
Update git connection logging
Put the logging under the zuul hierarchy, and also add the ref
to the event representation. Both of these changes are in aid
of better visibility of git events.
Change-Id: Iac00be7536ad236e366cd793366ac6819357c17c
Notes
Notes (review):
Code-Review+2: Monty Taylor <mordred@inaugust.com>
Code-Review+2: Tobias Henkel <tobias.henkel@bmw.de>
Workflow+1: Tobias Henkel <tobias.henkel@bmw.de>
Verified+2: Zuul
Submitted-by: Zuul
Submitted-at: Thu, 07 Feb 2019 19:29:51 +0000
Reviewed-on: https://review.openstack.org/635204
Project: openstack-infra/zuul
Branch: refs/heads/master
-rw-r--r-- | zuul/driver/git/gitconnection.py | 4 | ||||
-rw-r--r-- | zuul/driver/git/gitmodel.py | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/zuul/driver/git/gitconnection.py b/zuul/driver/git/gitconnection.py index 6ef93b4..36993fc 100644 --- a/zuul/driver/git/gitconnection.py +++ b/zuul/driver/git/gitconnection.py | |||
@@ -28,7 +28,7 @@ from zuul.model import Ref, Branch | |||
28 | 28 | ||
29 | 29 | ||
30 | class GitWatcher(threading.Thread): | 30 | class GitWatcher(threading.Thread): |
31 | log = logging.getLogger("connection.git.GitWatcher") | 31 | log = logging.getLogger("zuul.connection.git.watcher") |
32 | 32 | ||
33 | def __init__(self, git_connection, baseurl, poll_delay): | 33 | def __init__(self, git_connection, baseurl, poll_delay): |
34 | threading.Thread.__init__(self) | 34 | threading.Thread.__init__(self) |
@@ -133,7 +133,7 @@ class GitWatcher(threading.Thread): | |||
133 | 133 | ||
134 | class GitConnection(BaseConnection): | 134 | class GitConnection(BaseConnection): |
135 | driver_name = 'git' | 135 | driver_name = 'git' |
136 | log = logging.getLogger("connection.git") | 136 | log = logging.getLogger("zuul.connection.git") |
137 | 137 | ||
138 | def __init__(self, driver, connection_name, connection_config): | 138 | def __init__(self, driver, connection_name, connection_config): |
139 | super(GitConnection, self).__init__(driver, connection_name, | 139 | super(GitConnection, self).__init__(driver, connection_name, |
diff --git a/zuul/driver/git/gitmodel.py b/zuul/driver/git/gitmodel.py index 5d12b36..c59833a 100644 --- a/zuul/driver/git/gitmodel.py +++ b/zuul/driver/git/gitmodel.py | |||
@@ -29,7 +29,9 @@ class GitTriggerEvent(TriggerEvent): | |||
29 | self.project_name) | 29 | self.project_name) |
30 | 30 | ||
31 | if self.branch: | 31 | if self.branch: |
32 | ret += " %s" % self.branch | 32 | ret += " branch:%s" % self.branch |
33 | if self.ref: | ||
34 | ret += " ref:%s" % self.ref | ||
33 | ret += " oldrev:%s" % self.oldrev | 35 | ret += " oldrev:%s" % self.oldrev |
34 | ret += " newrev:%s" % self.newrev | 36 | ret += " newrev:%s" % self.newrev |
35 | ret += '>' | 37 | ret += '>' |