Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MarshalZerologObject is not called on embedded structs #600

Open
bertold opened this issue Oct 14, 2023 · 0 comments
Open

MarshalZerologObject is not called on embedded structs #600

bertold opened this issue Oct 14, 2023 · 0 comments

Comments

@bertold
Copy link

bertold commented Oct 14, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant