I would like to suppress logging certain fields in particular struct. This works fine with the Interface() call when the struct is used directly and the struct implements the LogObjectMarshaler interface. However, if the same type is included in another struct, then the LogObjectMarshaler is not called on the embedded object.
For illustration see this sample on the Go Playground.
I would like to suppress logging certain fields in particular struct. This works fine with the
Interface()
call when the struct is used directly and the struct implements theLogObjectMarshaler
interface. However, if the same type is included in another struct, then theLogObjectMarshaler
is not called on the embedded object.For illustration see this sample on the Go Playground.