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
This commit is contained in:
James E. Blair 2019-02-06 08:11:35 -08:00
parent 9019158139
commit 36c06e0bb4
2 changed files with 5 additions and 3 deletions

View File

@ -28,7 +28,7 @@ from zuul.model import Ref, Branch
class GitWatcher(threading.Thread):
log = logging.getLogger("connection.git.GitWatcher")
log = logging.getLogger("zuul.connection.git.watcher")
def __init__(self, git_connection, baseurl, poll_delay):
threading.Thread.__init__(self)
@ -133,7 +133,7 @@ class GitWatcher(threading.Thread):
class GitConnection(BaseConnection):
driver_name = 'git'
log = logging.getLogger("connection.git")
log = logging.getLogger("zuul.connection.git")
def __init__(self, driver, connection_name, connection_config):
super(GitConnection, self).__init__(driver, connection_name,

View File

@ -29,7 +29,9 @@ class GitTriggerEvent(TriggerEvent):
self.project_name)
if self.branch:
ret += " %s" % self.branch
ret += " branch:%s" % self.branch
if self.ref:
ret += " ref:%s" % self.ref
ret += " oldrev:%s" % self.oldrev
ret += " newrev:%s" % self.newrev
ret += '>'