Skip to content

Commit

Permalink
Fix incorrect usage of logrus when formatting string is present
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
yongtang committed Jun 11, 2016
1 parent 96110f3 commit d917723
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion daemon/daemon_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ func verifyContainerResources(resources *containertypes.Resources, sysInfo *sysi
}
if resources.CPUPercent > 0 {
warnings = append(warnings, "%s does not support CPU percent. Percent discarded.", runtime.GOOS)
logrus.Warn("%s does not support CPU percent. Percent discarded.", runtime.GOOS)
logrus.Warnf("%s does not support CPU percent. Percent discarded.", runtime.GOOS)
resources.CPUPercent = 0
}

Expand Down
2 changes: 1 addition & 1 deletion integration-cli/events_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ func (e *eventObserver) Match(match eventMatcher, process eventMatchProcessor) {
err = io.EOF
}

logrus.Debug("EventObserver scanner loop finished: %v", err)
logrus.Debugf("EventObserver scanner loop finished: %v", err)
e.disconnectionError = err
}

Expand Down

0 comments on commit d917723

Please sign in to comment.