summaryrefslogtreecommitdiffstats
path: root/vendor/go.uber.org/zap/options.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/go.uber.org/zap/options.go')
-rw-r--r--vendor/go.uber.org/zap/options.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/vendor/go.uber.org/zap/options.go b/vendor/go.uber.org/zap/options.go
index 0135c209..e9e66161 100644
--- a/vendor/go.uber.org/zap/options.go
+++ b/vendor/go.uber.org/zap/options.go
@@ -138,3 +138,11 @@ func OnFatal(action zapcore.CheckWriteAction) Option {
log.onFatal = action
})
}
+
+// WithClock specifies the clock used by the logger to determine the current
+// time for logged entries. Defaults to the system clock with time.Now.
+func WithClock(clock zapcore.Clock) Option {
+ return optionFunc(func(log *Logger) {
+ log.clock = clock
+ })
+}