@@ -56,10 +56,10 @@ func UseDevMode(enabled bool) Opts {
56
56
}
57
57
58
58
// WriteTo configures the logger to write to the given io.Writer, instead of standard error.
59
- // See Options.DestWritter
59
+ // See Options.DesWriter
60
60
func WriteTo (out io.Writer ) Opts {
61
61
return func (o * Options ) {
62
- o .DestWritter = out
62
+ o .DesWriter = out
63
63
}
64
64
}
65
65
@@ -143,9 +143,9 @@ type Options struct {
143
143
// NewEncoder configures Encoder using the provided EncoderConfigOptions.
144
144
// Note that the NewEncoder function is not used when the Encoder option is already set.
145
145
NewEncoder NewEncoderFunc
146
- // DestWritter controls the destination of the log output. Defaults to
146
+ // DestWriter controls the destination of the log output. Defaults to
147
147
// os.Stderr.
148
- DestWritter io.Writer
148
+ DesWriter io.Writer
149
149
// Level configures the verbosity of the logging. Defaults to Debug when
150
150
// Development is true and Info otherwise
151
151
Level zapcore.LevelEnabler
@@ -160,8 +160,8 @@ type Options struct {
160
160
161
161
// addDefaults adds defaults to the Options
162
162
func (o * Options ) addDefaults () {
163
- if o .DestWritter == nil {
164
- o .DestWritter = os .Stderr
163
+ if o .DesWriter == nil {
164
+ o .DesWriter = os .Stderr
165
165
}
166
166
167
167
if o .Development {
@@ -216,7 +216,7 @@ func NewRaw(opts ...Opts) *zap.Logger {
216
216
o .addDefaults ()
217
217
218
218
// this basically mimics New<type>Config, but with a custom sink
219
- sink := zapcore .AddSync (o .DestWritter )
219
+ sink := zapcore .AddSync (o .DesWriter )
220
220
221
221
o .ZapOpts = append (o .ZapOpts , zap .AddCallerSkip (1 ), zap .ErrorOutput (sink ))
222
222
log := zap .New (zapcore .NewCore (& KubeAwareEncoder {Encoder : o .Encoder , Verbose : o .Development }, sink , o .Level ))
0 commit comments