Change at which level klog.Fatal is invoked

Kubernetes-commit: 6b4dd3d774bcc84a1f969214096b9cfa373ad389
This commit is contained in:
Maciej Szulik 2020-09-09 21:41:56 +02:00 committed by Kubernetes Publisher
parent f3f6723bf3
commit e650b90b3e
1 changed files with 2 additions and 2 deletions

View File

@ -86,10 +86,10 @@ func DefaultBehaviorOnFatal() {
fatalErrHandler = fatal fatalErrHandler = fatal
} }
// fatal prints the message (if provided) and then exits. If V(2) or greater, // fatal prints the message (if provided) and then exits. If V(6) or greater,
// klog.Fatal is invoked for extended information. // klog.Fatal is invoked for extended information.
func fatal(msg string, code int) { func fatal(msg string, code int) {
if klog.V(2).Enabled() { if klog.V(6).Enabled() {
klog.FatalDepth(2, msg) klog.FatalDepth(2, msg)
} }
if len(msg) > 0 { if len(msg) > 0 {