You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd be willing to PR this, what I would do is add the struct tag json:"-" on fields that should not be printed / logged (e.g. MapperProvider) and then use the standard json.Marshal to get my human readable string.
Wanted to gauge interest before making a PR
The text was updated successfully, but these errors were encountered:
It would be very nice if the ManagerOptions https://github.com/kubernetes-sigs/controller-runtime/blob/main/pkg/manager/manager.go#L101 was more easily printable. Example use case: logging on startup to be sure of what config is used.
Using fmt.Sprintf("%#v", options) has been my workaround but it's pretty suboptimal (pointers not followed for example)
Currently using json.Marshal gives an error like
Failing to marshal this field named MapperProvider
I'd be willing to PR this, what I would do is add the struct tag
json:"-"
on fields that should not be printed / logged (e.g. MapperProvider) and then use the standardjson.Marshal
to get my human readable string.Wanted to gauge interest before making a PR
The text was updated successfully, but these errors were encountered: