From 75707236357ca67459cba5dc9d48a9d3e062870f Mon Sep 17 00:00:00 2001 From: Pimyn Girgis Date: Tue, 10 Feb 2026 16:18:38 +0100 Subject: pkg/debugtracer: rename Log to Logf The methods are used for formatted output, so rename them to follow Go conventions. Additionally, fix TestTracer to use formatted output (t.Logf) instead of unformatted output (t.Log). --- pkg/debugtracer/debug.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'pkg/debugtracer/debug.go') diff --git a/pkg/debugtracer/debug.go b/pkg/debugtracer/debug.go index fa30c244a..809e34f1e 100644 --- a/pkg/debugtracer/debug.go +++ b/pkg/debugtracer/debug.go @@ -14,7 +14,7 @@ import ( ) type DebugTracer interface { - Log(msg string, args ...any) + Logf(msg string, args ...any) SaveFile(filename string, data []byte) } @@ -31,7 +31,7 @@ type TestTracer struct { type NullTracer struct { } -func (gt *GenericTracer) Log(msg string, args ...any) { +func (gt *GenericTracer) Logf(msg string, args ...any) { if gt.WithTime { timeStr := time.Now().Format("02-Jan-2006 15:04:05") newArgs := append([]any{timeStr}, args...) @@ -49,15 +49,15 @@ func (gt *GenericTracer) SaveFile(filename string, data []byte) { osutil.WriteFile(filepath.Join(gt.OutDir, filename), data) } -func (tt *TestTracer) Log(msg string, args ...any) { - tt.T.Log(msg, args) +func (tt *TestTracer) Logf(msg string, args ...any) { + tt.T.Logf(msg, args...) } func (tt *TestTracer) SaveFile(filename string, data []byte) { // Not implemented. } -func (nt *NullTracer) Log(msg string, args ...any) { +func (nt *NullTracer) Logf(msg string, args ...any) { // Not implemented. } -- cgit mrf-deployment