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
Setting pkg/log/zap.Options.Development = true then constructing a zap logger using the prescribed code doesn't seem to turn on debug logging (or development mode at all).
The old way (main.go):
varlogger=ctrl.Log.WithName("setup")
funcmain() {
ctrl.SetLogger(zap.New(zap.UseDevMode(true)))
logger.V(1).Info("running in debug")
}
Then:
$ go run main.go2020-10-26T16:32:04.135-0700 DEBUG setup running in debug
controller-runtime v0.6.3
Setting
pkg/log/zap.Options.Development = true
then constructing a zap logger using the prescribed code doesn't seem to turn on debug logging (or development mode at all).The old way (
main.go
):Then:
The new way (
main.go
):Then:
$ go run main.go # no output
But if I set
--zap-log-level=debug
explicitly:Note how the output is JSON, which is the default production output encoding; development should give console output according to the docs.
And if I set
--zap-devel
explicitly:/kind bug
/ping @joelanford @DirectXMan12
The text was updated successfully, but these errors were encountered: