klog.V(1).Info("succesfully created deployment clientset in detailed")
is not priniting anything in command line though i imported
"github.com/kubernetes/klog"
.how to use debug level klogs using verbosity levels
klog.V(1).Info("succesfully created deployment clientset in detailed")
is not priniting anything in command line though i imported
"github.com/kubernetes/klog"
.how to use debug level klogs using verbosity levels
You need to pass "-v=1" to print it.
"-v=n" will print log entries with verbosity <= n.
Besides, if you write the program, you should also parse klog args before they take effect, put the code below in the begining of your main function:
klog.InitFlags(nil) // initializing the flags
defer klog.Flush() // flushes all pending log I/O
flag.Parse() // parses the command-line flags
klog.Info("now you can see me")
It will show output only if verbosity is enabled