summaryrefslogtreecommitdiff
path: root/pkg/bindings
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2021-09-22 09:45:15 -0400
committerDaniel J Walsh <dwalsh@redhat.com>2021-09-22 15:29:34 -0400
commit1c4e6d86241ff63cb2843429bcf2b049325be7b6 (patch)
treee4b27062a678d8ff2729c976751964b7acfa70c8 /pkg/bindings
parentaa628b82b1c2f04fb3a9a9207bb6d6bddb497fbb (diff)
downloadpodman-1c4e6d86241ff63cb2843429bcf2b049325be7b6.tar.gz
podman-1c4e6d86241ff63cb2843429bcf2b049325be7b6.tar.bz2
podman-1c4e6d86241ff63cb2843429bcf2b049325be7b6.zip
standardize logrus messages to upper case
Remove ERROR: Error stutter from logrus messages also. [ NO TESTS NEEDED] This is just code cleanup. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'pkg/bindings')
-rw-r--r--pkg/bindings/containers/attach.go14
-rw-r--r--pkg/bindings/images/build.go8
2 files changed, 11 insertions, 11 deletions
diff --git a/pkg/bindings/containers/attach.go b/pkg/bindings/containers/attach.go
index 6efbcb57b..abf58aaf9 100644
--- a/pkg/bindings/containers/attach.go
+++ b/pkg/bindings/containers/attach.go
@@ -102,7 +102,7 @@ func Attach(ctx context.Context, nameOrID string, stdin io.Reader, stdout io.Wri
}
defer func() {
if err := terminal.Restore(int(file.Fd()), state); err != nil {
- logrus.Errorf("unable to restore terminal: %q", err)
+ logrus.Errorf("Unable to restore terminal: %q", err)
}
logrus.SetFormatter(&logrus.TextFormatter{})
}()
@@ -166,7 +166,7 @@ func Attach(ctx context.Context, nameOrID string, stdin io.Reader, stdout io.Wri
_, err := utils.CopyDetachable(socket, stdin, detachKeysInBytes)
if err != nil && err != define.ErrDetach {
- logrus.Error("failed to write input to service: " + err.Error())
+ logrus.Errorf("Failed to write input to service: %v", err)
}
stdinChan <- err
@@ -349,7 +349,7 @@ func attachHandleResize(ctx, winCtx context.Context, winChange chan os.Signal, i
resize := func() {
w, h, err := terminal.GetSize(int(file.Fd()))
if err != nil {
- logrus.Warnf("failed to obtain TTY size: %v", err)
+ logrus.Warnf("Failed to obtain TTY size: %v", err)
}
var resizeErr error
@@ -359,7 +359,7 @@ func attachHandleResize(ctx, winCtx context.Context, winChange chan os.Signal, i
resizeErr = ResizeContainerTTY(ctx, id, new(ResizeTTYOptions).WithHeight(h).WithWidth(w))
}
if resizeErr != nil {
- logrus.Infof("failed to resize TTY: %v", resizeErr)
+ logrus.Infof("Failed to resize TTY: %v", resizeErr)
}
}
@@ -443,13 +443,13 @@ func ExecStartAndAttach(ctx context.Context, sessionID string, options *ExecStar
}
defer func() {
if err := terminal.Restore(int(terminalFile.Fd()), state); err != nil {
- logrus.Errorf("unable to restore terminal: %q", err)
+ logrus.Errorf("Unable to restore terminal: %q", err)
}
logrus.SetFormatter(&logrus.TextFormatter{})
}()
w, h, err := terminal.GetSize(int(terminalFile.Fd()))
if err != nil {
- logrus.Warnf("failed to obtain TTY size: %v", err)
+ logrus.Warnf("Failed to obtain TTY size: %v", err)
}
body.Width = uint16(w)
body.Height = uint16(h)
@@ -502,7 +502,7 @@ func ExecStartAndAttach(ctx context.Context, sessionID string, options *ExecStar
logrus.Debugf("Copying STDIN to socket")
_, err := utils.CopyDetachable(socket, options.InputStream, []byte{})
if err != nil {
- logrus.Error("failed to write input to service: " + err.Error())
+ logrus.Errorf("Failed to write input to service: %v", err)
}
if closeWrite, ok := socket.(CloseWriter); ok {
diff --git a/pkg/bindings/images/build.go b/pkg/bindings/images/build.go
index 9d5aad23b..ded97d8d6 100644
--- a/pkg/bindings/images/build.go
+++ b/pkg/bindings/images/build.go
@@ -312,7 +312,7 @@ func Build(ctx context.Context, containerFiles []string, options entities.BuildO
contextDir, err := filepath.Abs(options.ContextDirectory)
if err != nil {
- logrus.Errorf("cannot find absolute path of %v: %v", options.ContextDirectory, err)
+ logrus.Errorf("Cannot find absolute path of %v: %v", options.ContextDirectory, err)
return nil, err
}
@@ -339,7 +339,7 @@ func Build(ctx context.Context, containerFiles []string, options entities.BuildO
}
containerfile, err := filepath.Abs(c)
if err != nil {
- logrus.Errorf("cannot find absolute path of %v: %v", c, err)
+ logrus.Errorf("Cannot find absolute path of %v: %v", c, err)
return nil, err
}
@@ -371,7 +371,7 @@ func Build(ctx context.Context, containerFiles []string, options entities.BuildO
}
tarfile, err := nTar(append(excludes, dontexcludes...), tarContent...)
if err != nil {
- logrus.Errorf("cannot tar container entries %v error: %v", tarContent, err)
+ logrus.Errorf("Cannot tar container entries %v error: %v", tarContent, err)
return nil, err
}
defer func() {
@@ -477,7 +477,7 @@ func nTar(excludes []string, sources ...string) (io.ReadCloser, error) {
for _, src := range sources {
s, err := filepath.Abs(src)
if err != nil {
- logrus.Errorf("cannot stat one of source context: %v", err)
+ logrus.Errorf("Cannot stat one of source context: %v", err)
merr = multierror.Append(merr, err)
return
}