Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: SetLogger via klog.SetLogger will output an unexpected newline
klog always adds a newline to the msg. klog will work fine without klog. Set logr with klog.SetLogger, and klog will also pass the msg with the newline added to logr, which will result in an accidental newline being added. step1: klog.Info("hello world") step2: msg = msg + "\n" step3: stdout.W(msg) or logr.Info(msg[:len(msg)-1]) fix #370 Signed-off-by: aimuz <mr.imuz@gmail.com>
- Loading branch information