Commit f5391bc
committed
ssh/connection.go: fix and enhance trace logs
We added trace logging to several functions and methods related to
the creation and shutdown of SSH connections in commit
326b1ee of PR git-lfs#5063, which help
when debugging any problems with our implementation of the SSH-based
object transfer protocol.
However, in the startConnection() function in our ssh/connection.go
source file, we report the successful creation of a connection even
if we are returning a non-nil error value. Therefore we revise our
trace logging there to distinguish unsuccessful and successful conditions,
based on whether the PktlineConnection structure's Start() method
returned an error or not.
As well, we update a number of our other trace log message to include
the connection ID. Because we maintain a set of SSH connections and
do not necessarily start or shut down all of them at the same time,
this change provides further clarity as to the state of each
individual connection at different points in a trace log.1 parent 34dcdb9 commit f5391bc
1 file changed
+10
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
| 45 | + | |
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
84 | 87 | | |
85 | | - | |
86 | 88 | | |
87 | 89 | | |
88 | 90 | | |
| |||
150 | 152 | | |
151 | 153 | | |
152 | 154 | | |
153 | | - | |
| 155 | + | |
154 | 156 | | |
155 | 157 | | |
156 | 158 | | |
| |||
163 | 165 | | |
164 | 166 | | |
165 | 167 | | |
166 | | - | |
| 168 | + | |
167 | 169 | | |
168 | | - | |
| 170 | + | |
169 | 171 | | |
170 | 172 | | |
171 | | - | |
| 173 | + | |
172 | 174 | | |
173 | 175 | | |
174 | 176 | | |
| |||
189 | 191 | | |
190 | 192 | | |
191 | 193 | | |
192 | | - | |
| 194 | + | |
193 | 195 | | |
194 | 196 | | |
195 | 197 | | |
| |||
200 | 202 | | |
201 | 203 | | |
202 | 204 | | |
203 | | - | |
| 205 | + | |
204 | 206 | | |
205 | 207 | | |
0 commit comments