Skip to content

Commit f0326ef

Browse files
committed
Use ConnStr for consistency
1 parent 69fe5dd commit f0326ef

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

vsl/transaction.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ func (t *Transaction) GetBackendConnStr() string {
112112
return ""
113113
}
114114
record := r.(BackendOpenRecord)
115-
return fmt.Sprintf("%s:%d", record.RemoteAddr.String(), record.RemotePort)
115+
return record.ConnStr()
116116
}
117117

118118
// StartTime is a helper function that returns the approximate start time of the transaction
@@ -287,10 +287,10 @@ func (t TransactionSet) RawLog() string {
287287
s.WriteString("\n")
288288
}
289289

290-
s.WriteString(fmt.Sprintf("%s\n", tx.RawLog))
290+
fmt.Fprintf(&s, "%s\n", tx.RawLog)
291291

292292
for _, r := range tx.Records {
293-
s.WriteString(fmt.Sprintf("%s\n", r.GetRawLog()))
293+
fmt.Fprintf(&s, "%s\n", r.GetRawLog())
294294
}
295295
s.WriteString("\n")
296296
}
@@ -311,10 +311,10 @@ func (t TransactionSet) RawLogForTx(tx *Transaction, includeChildrenTxs bool) st
311311
s.WriteString("\n")
312312
}
313313

314-
s.WriteString(fmt.Sprintf("%s\n", tx.RawLog))
314+
fmt.Fprintf(&s, "%s\n", tx.RawLog)
315315

316316
for _, r := range tx.Records {
317-
s.WriteString(fmt.Sprintf("%s\n", r.GetRawLog()))
317+
fmt.Fprintf(&s, "%s\n", r.GetRawLog())
318318
}
319319
s.WriteString("\n")
320320
}

0 commit comments

Comments
 (0)