This fix tries to fix logrus formatting by adding `f` to the end of
`logrus.[Error|Warn|Debug|Fatal|Panic|Info](` when formatting string
is present but the function `logrus.[Error|Warn|Debug|Fatal|Panic|Info](`
is used (incorrectly).
This fix is related to #23459, and is a follow up of #23461.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
... | ... |
@@ -362,7 +362,7 @@ func verifyContainerResources(resources *containertypes.Resources, sysInfo *sysi |
362 | 362 |
} |
363 | 363 |
if resources.CPUPercent > 0 { |
364 | 364 |
warnings = append(warnings, "%s does not support CPU percent. Percent discarded.", runtime.GOOS) |
365 |
- logrus.Warn("%s does not support CPU percent. Percent discarded.", runtime.GOOS) |
|
365 |
+ logrus.Warnf("%s does not support CPU percent. Percent discarded.", runtime.GOOS) |
|
366 | 366 |
resources.CPUPercent = 0 |
367 | 367 |
} |
368 | 368 |
|
... | ... |
@@ -89,7 +89,7 @@ func (e *eventObserver) Match(match eventMatcher, process eventMatchProcessor) { |
89 | 89 |
err = io.EOF |
90 | 90 |
} |
91 | 91 |
|
92 |
- logrus.Debug("EventObserver scanner loop finished: %v", err) |
|
92 |
+ logrus.Debugf("EventObserver scanner loop finished: %v", err) |
|
93 | 93 |
e.disconnectionError = err |
94 | 94 |
} |
95 | 95 |
|