Fix incorrect logging calls that don't do formatting (#290)

The errors can be found by running `go vet`.
Found these issues while packaging.
This commit is contained in:
Rick van Schijndel 2021-06-06 20:27:01 +02:00 committed by GitHub
orang tua fcd8f0dc1c
melakukan ed21e07e04
Tidak diketahui kunci yang ditemukan di database signature
GPG Key ID: 4AEE18F83AFDEB23
2 mengubah file dengan 2 tambahan dan 2 penghapusan

Melihat File

@ -104,7 +104,7 @@ func validateFrameworkConfiguration() {
// Validate Go Runtime config
if config.GOMAXPROCS < 0 {
log.Fatal("invalid GOMAXPROCS (must be positive, given %d)", config.GOMAXPROCS)
log.Fatalf("invalid GOMAXPROCS (must be positive, given %d)", config.GOMAXPROCS)
}
runtime.GOMAXPROCS(config.GOMAXPROCS)

Melihat File

@ -85,7 +85,7 @@ func (c *TimeoutConnection) Read(b []byte) (n int, err error) {
// we had to shrink the output buffer AND we used up the whole shrunk size, AND we're not at EOF
switch c.ReadLimitExceededAction {
case ReadLimitExceededActionTruncate:
logrus.Debug("Truncated read from %d bytes to %d bytes (hit limit of %d bytes)", origSize, n, c.BytesReadLimit)
logrus.Debugf("Truncated read from %d bytes to %d bytes (hit limit of %d bytes)", origSize, n, c.BytesReadLimit)
err = io.EOF
case ReadLimitExceededActionError:
return n, ErrReadLimitExceeded