Why doesn't the Error function have the judgment of l.sink.Enabled(l. level) like the Info function
|
func (l Logger) Error(err error, msg string, keysAndValues ...any) { |
|
if l.sink == nil { |
|
return |
|
} |
|
if withHelper, ok := l.sink.(CallStackHelperLogSink); ok { |
|
withHelper.GetCallStackHelper()() |
|
} |
|
l.sink.Error(err, msg, keysAndValues...) |
|
} |
which causes logger.V(level).Error level to be invalid no matter what it is set to