Skip to content

Commit

Permalink
Add otherArgs to time track
Browse files Browse the repository at this point in the history
Signed-off-by: Dongri Jin <[email protected]>
  • Loading branch information
dongrie committed Oct 24, 2023
1 parent 4e913ba commit 5a6c77e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions log/slog.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

0 comments on commit 5a6c77e

Please sign in to comment.