zerolog
zerolog copied to clipboard
MarshalZerologObject is not called on embedded structs
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.