diff --git a/modules/logging/filters.go b/modules/logging/filters.go index 3bc1e2cb..a5a917de 100644 --- a/modules/logging/filters.go +++ b/modules/logging/filters.go @@ -141,7 +141,7 @@ func (m IPMaskFilter) Filter(in zapcore.Field) zapcore.Field { return in } mask := m.v4Mask - if ipAddr.To16() != nil { + if ipAddr.To4() == nil { mask = m.v6Mask } masked := ipAddr.Mask(mask)