From 5a6c77e7a4e8946d212f12e865a1e5a4c064bb69 Mon Sep 17 00:00:00 2001 From: Dongri Jin Date: Tue, 24 Oct 2023 16:52:12 +0900 Subject: [PATCH] Add otherArgs to time track Signed-off-by: Dongri Jin --- log/slog.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/log/slog.go b/log/slog.go index 75946f76..a38c75d1 100644 --- a/log/slog.go +++ b/log/slog.go @@ -187,7 +187,7 @@ func (rl *RelayLogger) WithModule( } } -func (rl *RelayLogger) TimeTrack(start time.Time, name string) { +func (rl *RelayLogger) TimeTrack(start time.Time, name string, otherArgs ...any) { elapsed := time.Since(start) - rl.Logger.Info("time track", "name", name, "elapsed", elapsed.Nanoseconds()) + rl.Logger.Info("time track", "name", name, "elapsed", elapsed.Nanoseconds(), otherArgs) }