-
Notifications
You must be signed in to change notification settings - Fork 729
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
Homogenize logs #305
Comments
It could also be the opportunity to homogenize the log messages. Sometimes there are parametrized messages, sometimes messages use key-values but with keys not always in snakecase. Should be the only one in camelcase (fixed in 0213ef9). |
To be honest I was not familiar with "structured logging" as it is done in the controller-runtime 😳 Much more simpler that what I have seen before. My only concern would be to be able the turn on the debug level easily on a specific environment (c.f. FWIW it's a +1 for option 1, may be we can "extract" some ideas from https://github.com/kubernetes-sigs/controller-runtime/blob/master/TMP-LOGGING.md in a contributing guide ? |
I think I am also for option 1 (just use 2 levels) The only other thing to consider maybe is that currently iirc debug level is tied to our Is it worth having the option to turn on the verbose mode in production as well when things don't go according to plan? |
We discussed this issue today during the status meeting. Some notes:
|
Do we still think this is necessary? It looks like doing this through kubebuilder is a little bit more involved and I'm not sure what the use case is. I think we would end up mostly re-implementing this function but exposing the knobs we want: If not I think we can close this issue as the other bullets are checked off now |
Things are in a rather strange state currently:
log.Info()
most of the times (log level: 0)log.V(3)
orlog.V(4)
-vvvv
to adapt the level of log getting printed outV(1)
) and logs encoded for a better output on the terminalV(0)
) and logs encoded as JSONV(3)
orV(4)
has no effect.Recommendations from the controller-runtime team seems to be: stick to INFO for production and
V(1).Info
(debug) for development. See this doc and this issue.I think we should either:
-vvv
)I would personally vote for option 1 (simpler).
The text was updated successfully, but these errors were encountered: