summaryrefslogtreecommitdiffstats
path: root/vendor/go.uber.org/zap/encoder.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/go.uber.org/zap/encoder.go')
-rw-r--r--vendor/go.uber.org/zap/encoder.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/vendor/go.uber.org/zap/encoder.go b/vendor/go.uber.org/zap/encoder.go
index 2e9d3c34..08ed8335 100644
--- a/vendor/go.uber.org/zap/encoder.go
+++ b/vendor/go.uber.org/zap/encoder.go
@@ -62,6 +62,10 @@ func RegisterEncoder(name string, constructor func(zapcore.EncoderConfig) (zapco
}
func newEncoder(name string, encoderConfig zapcore.EncoderConfig) (zapcore.Encoder, error) {
+ if encoderConfig.TimeKey != "" && encoderConfig.EncodeTime == nil {
+ return nil, fmt.Errorf("missing EncodeTime in EncoderConfig")
+ }
+
_encoderMutex.RLock()
defer _encoderMutex.RUnlock()
if name == "" {