feat: add logger.WithFields (#2546)

This commit is contained in:
Kevin Wan
2022-10-22 23:28:34 +08:00
committed by GitHub
parent 9cadab2684
commit 06e4914e41
3 changed files with 24 additions and 0 deletions

View File

@@ -45,4 +45,6 @@ type Logger interface {
WithContext(ctx context.Context) Logger
// WithDuration returns a new logger with the given duration.
WithDuration(d time.Duration) Logger
// WithFields returns a new logger with the given fields.
WithFields(fields ...LogField) Logger
}