Browse Source

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
James E. Blair 2 months ago
parent
commit
36c06e0bb4
2 changed files with 5 additions and 3 deletions
  1. 2
    2
      zuul/driver/git/gitconnection.py
  2. 3
    1
      zuul/driver/git/gitmodel.py

+ 2
- 2
zuul/driver/git/gitconnection.py View File

@@ -28,7 +28,7 @@ from zuul.model import Ref, Branch
28 28
 
29 29
 
30 30
 class GitWatcher(threading.Thread):
31
-    log = logging.getLogger("connection.git.GitWatcher")
31
+    log = logging.getLogger("zuul.connection.git.watcher")
32 32
 
33 33
     def __init__(self, git_connection, baseurl, poll_delay):
34 34
         threading.Thread.__init__(self)
@@ -133,7 +133,7 @@ class GitWatcher(threading.Thread):
133 133
 
134 134
 class GitConnection(BaseConnection):
135 135
     driver_name = 'git'
136
-    log = logging.getLogger("connection.git")
136
+    log = logging.getLogger("zuul.connection.git")
137 137
 
138 138
     def __init__(self, driver, connection_name, connection_config):
139 139
         super(GitConnection, self).__init__(driver, connection_name,

+ 3
- 1
zuul/driver/git/gitmodel.py View File

@@ -29,7 +29,9 @@ class GitTriggerEvent(TriggerEvent):
29 29
                                           self.project_name)
30 30
 
31 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 35
         ret += " oldrev:%s" % self.oldrev
34 36
         ret += " newrev:%s" % self.newrev
35 37
         ret += '>'

Loading…
Cancel
Save