summaryrefslogtreecommitdiff
path: root/pkg/domain
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/domain
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/domain')
-rw-r--r--pkg/domain/infra/abi/containers.go6
-rw-r--r--pkg/domain/infra/abi/containers_runlabel.go4
-rw-r--r--pkg/domain/infra/abi/images.go2
-rw-r--r--pkg/domain/infra/abi/manifest.go2
-rw-r--r--pkg/domain/infra/abi/play.go10
-rw-r--r--pkg/domain/infra/abi/terminal/sigproxy_linux.go4
-rw-r--r--pkg/domain/infra/abi/terminal/terminal_linux.go4
-rw-r--r--pkg/domain/infra/abi/trust.go2
-rw-r--r--pkg/domain/infra/runtime_libpod.go2
-rw-r--r--pkg/domain/infra/tunnel/containers.go6
10 files changed, 21 insertions, 21 deletions
diff --git a/pkg/domain/infra/abi/containers.go b/pkg/domain/infra/abi/containers.go
index affed64d1..02af214a6 100644
--- a/pkg/domain/infra/abi/containers.go
+++ b/pkg/domain/infra/abi/containers.go
@@ -825,7 +825,7 @@ func (ic *ContainerEngine) ContainerStart(ctx context.Context, namesOrIds []stri
})
if ctr.AutoRemove() {
if err := ic.removeContainer(ctx, ctr, entities.RmOptions{}); err != nil {
- logrus.Errorf("Error removing container %s: %v", ctr.ID(), err)
+ logrus.Errorf("Removing container %s: %v", ctr.ID(), err)
}
}
return reports, errors.Wrapf(err, "unable to start container %s", ctr.ID())
@@ -860,7 +860,7 @@ func (ic *ContainerEngine) ContainerStart(ctx context.Context, namesOrIds []stri
reports = append(reports, report)
if ctr.AutoRemove() {
if err := ic.removeContainer(ctx, ctr, entities.RmOptions{}); err != nil {
- logrus.Errorf("Error removing container %s: %v", ctr.ID(), err)
+ logrus.Errorf("Removing container %s: %v", ctr.ID(), err)
}
}
continue
@@ -978,7 +978,7 @@ func (ic *ContainerEngine) ContainerRun(ctx context.Context, opts entities.Conta
errors.Cause(err) == define.ErrCtrRemoved {
logrus.Infof("Container %s was already removed, skipping --rm", ctr.ID())
} else {
- logrus.Errorf("Error removing container %s: %v", ctr.ID(), err)
+ logrus.Errorf("Removing container %s: %v", ctr.ID(), err)
}
}
}
diff --git a/pkg/domain/infra/abi/containers_runlabel.go b/pkg/domain/infra/abi/containers_runlabel.go
index 435baa8c8..add82f0fb 100644
--- a/pkg/domain/infra/abi/containers_runlabel.go
+++ b/pkg/domain/infra/abi/containers_runlabel.go
@@ -87,7 +87,7 @@ func (ic *ContainerEngine) ContainerRunlabel(ctx context.Context, label string,
ctr, err := ic.Libpod.LookupContainer(name)
if err != nil {
if errors.Cause(err) != define.ErrNoSuchCtr {
- logrus.Debugf("Error occurred searching for container %s: %s", name, err.Error())
+ logrus.Debugf("Error occurred searching for container %s: %v", name, err)
return err
}
} else {
@@ -167,7 +167,7 @@ func generateRunlabelCommand(runlabel string, img *libimage.Image, inputName str
// I would prefer to use os.getenv but it appears PWD is not in the os env list.
d, err := os.Getwd()
if err != nil {
- logrus.Error("unable to determine current working directory")
+ logrus.Error("Unable to determine current working directory")
return ""
}
return d
diff --git a/pkg/domain/infra/abi/images.go b/pkg/domain/infra/abi/images.go
index f8ee0304d..705ad7768 100644
--- a/pkg/domain/infra/abi/images.go
+++ b/pkg/domain/infra/abi/images.go
@@ -573,7 +573,7 @@ func (ir *ImageEngine) Sign(ctx context.Context, names []string, options entitie
}
defer func() {
if err = rawSource.Close(); err != nil {
- logrus.Errorf("unable to close %s image source %q", srcRef.DockerReference().Name(), err)
+ logrus.Errorf("Unable to close %s image source %q", srcRef.DockerReference().Name(), err)
}
}()
topManifestBlob, manifestType, err := rawSource.GetManifest(ctx, nil)
diff --git a/pkg/domain/infra/abi/manifest.go b/pkg/domain/infra/abi/manifest.go
index 1dd0686ac..d1bd5e2e4 100644
--- a/pkg/domain/infra/abi/manifest.go
+++ b/pkg/domain/infra/abi/manifest.go
@@ -146,7 +146,7 @@ func (ir *ImageEngine) remoteManifestInspect(ctx context.Context, name string) (
switch manType {
case manifest.DockerV2Schema2MediaType:
- logrus.Warnf("Warning! The manifest type %s is not a manifest list but a single image.", manType)
+ logrus.Warnf("The manifest type %s is not a manifest list but a single image.", manType)
schema2Manifest, err := manifest.Schema2FromManifest(result)
if err != nil {
return nil, errors.Wrapf(err, "error parsing manifest blob %q as a %q", string(result), manType)
diff --git a/pkg/domain/infra/abi/play.go b/pkg/domain/infra/abi/play.go
index 87506f70c..e386c17e9 100644
--- a/pkg/domain/infra/abi/play.go
+++ b/pkg/domain/infra/abi/play.go
@@ -113,7 +113,7 @@ func (ic *ContainerEngine) PlayKube(ctx context.Context, path string, options en
report.Volumes = append(report.Volumes, r.Volumes...)
validKinds++
default:
- logrus.Infof("kube kind %s not supported", kind)
+ logrus.Infof("Kube kind %s not supported", kind)
continue
}
}
@@ -662,21 +662,21 @@ func getBuildFile(imageName string, cwd string) (string, error) {
containerfilePath := filepath.Join(cwd, buildDirName, "Containerfile")
dockerfilePath := filepath.Join(cwd, buildDirName, "Dockerfile")
- _, err := os.Stat(filepath.Join(containerfilePath))
+ _, err := os.Stat(containerfilePath)
if err == nil {
- logrus.Debugf("building %s with %s", imageName, containerfilePath)
+ logrus.Debugf("Building %s with %s", imageName, containerfilePath)
return containerfilePath, nil
}
// If the error is not because the file does not exist, take
// a mulligan and try Dockerfile. If that also fails, return that
// error
if err != nil && !os.IsNotExist(err) {
- logrus.Errorf("%v: unable to check for %s", err, containerfilePath)
+ logrus.Error(err.Error())
}
_, err = os.Stat(filepath.Join(dockerfilePath))
if err == nil {
- logrus.Debugf("building %s with %s", imageName, dockerfilePath)
+ logrus.Debugf("Building %s with %s", imageName, dockerfilePath)
return dockerfilePath, nil
}
// Strike two
diff --git a/pkg/domain/infra/abi/terminal/sigproxy_linux.go b/pkg/domain/infra/abi/terminal/sigproxy_linux.go
index a9bd2d5fb..3b129f5ea 100644
--- a/pkg/domain/infra/abi/terminal/sigproxy_linux.go
+++ b/pkg/domain/infra/abi/terminal/sigproxy_linux.go
@@ -42,7 +42,7 @@ func ProxySignals(ctr *libpod.Container) {
if errors.Cause(err) == define.ErrCtrStateInvalid {
logrus.Infof("Ceasing signal forwarding to container %s as it has stopped", ctr.ID())
} else {
- logrus.Errorf("Error forwarding signal %d to container %s: %v", s, ctr.ID(), err)
+ logrus.Errorf("forwarding signal %d to container %s: %v", s, ctr.ID(), err)
}
// If the container dies, and we find out here,
// we need to forward that one signal to
@@ -51,7 +51,7 @@ func ProxySignals(ctr *libpod.Container) {
// play out.
signal.StopCatch(sigBuffer)
if err := syscall.Kill(syscall.Getpid(), s.(syscall.Signal)); err != nil {
- logrus.Errorf("failed to kill pid %d", syscall.Getpid())
+ logrus.Errorf("Failed to kill pid %d", syscall.Getpid())
}
return
}
diff --git a/pkg/domain/infra/abi/terminal/terminal_linux.go b/pkg/domain/infra/abi/terminal/terminal_linux.go
index 09c0f802d..ba047bf33 100644
--- a/pkg/domain/infra/abi/terminal/terminal_linux.go
+++ b/pkg/domain/infra/abi/terminal/terminal_linux.go
@@ -29,7 +29,7 @@ func ExecAttachCtr(ctx context.Context, ctr *libpod.Container, execConfig *libpo
defer cancel()
defer func() {
if err := restoreTerminal(oldTermState); err != nil {
- logrus.Errorf("unable to restore terminal: %q", err)
+ logrus.Errorf("Unable to restore terminal: %q", err)
}
}()
}
@@ -53,7 +53,7 @@ func StartAttachCtr(ctx context.Context, ctr *libpod.Container, stdout, stderr,
}
defer func() {
if err := restoreTerminal(oldTermState); err != nil {
- logrus.Errorf("unable to restore terminal: %q", err)
+ logrus.Errorf("Unable to restore terminal: %q", err)
}
}()
defer cancel()
diff --git a/pkg/domain/infra/abi/trust.go b/pkg/domain/infra/abi/trust.go
index d3aff62ba..af7814163 100644
--- a/pkg/domain/infra/abi/trust.go
+++ b/pkg/domain/infra/abi/trust.go
@@ -165,7 +165,7 @@ var typeDescription = map[string]string{"insecureAcceptAnything": "accept", "sig
func trustTypeDescription(trustType string) string {
trustDescription, exist := typeDescription[trustType]
if !exist {
- logrus.Warnf("invalid trust type %s", trustType)
+ logrus.Warnf("Invalid trust type %s", trustType)
}
return trustDescription
}
diff --git a/pkg/domain/infra/runtime_libpod.go b/pkg/domain/infra/runtime_libpod.go
index 5cbee2e76..7ec6135ee 100644
--- a/pkg/domain/infra/runtime_libpod.go
+++ b/pkg/domain/infra/runtime_libpod.go
@@ -369,7 +369,7 @@ func StartWatcher(rt *libpod.Runtime) {
logrus.Debugf("waiting for SIGHUP to reload configuration")
<-ch
if err := rt.Reload(); err != nil {
- logrus.Errorf("unable to reload configuration: %v", err)
+ logrus.Errorf("Unable to reload configuration: %v", err)
continue
}
}
diff --git a/pkg/domain/infra/tunnel/containers.go b/pkg/domain/infra/tunnel/containers.go
index 81ddce42f..9fe2d163c 100644
--- a/pkg/domain/infra/tunnel/containers.go
+++ b/pkg/domain/infra/tunnel/containers.go
@@ -561,7 +561,7 @@ func (ic *ContainerEngine) ContainerStart(ctx context.Context, namesOrIds []stri
errorhandling.Contains(err, define.ErrCtrRemoved) {
logrus.Debugf("Container %s does not exist: %v", id, err)
} else {
- logrus.Errorf("Error removing container %s: %v", id, err)
+ logrus.Errorf("Removing container %s: %v", id, err)
}
}
}
@@ -646,7 +646,7 @@ func (ic *ContainerEngine) ContainerStart(ctx context.Context, namesOrIds []stri
errorhandling.Contains(err, types.ErrLayerUnknown) {
logrus.Debugf("Container %s does not exist: %v", ctr.ID, err)
} else {
- logrus.Errorf("Error removing container %s: %v", ctr.ID, err)
+ logrus.Errorf("Removing container %s: %v", ctr.ID, err)
}
}
}
@@ -731,7 +731,7 @@ func (ic *ContainerEngine) ContainerRun(ctx context.Context, opts entities.Conta
errorhandling.Contains(err, types.ErrLayerUnknown) {
logrus.Debugf("Container %s does not exist: %v", con.ID, err)
} else {
- logrus.Errorf("Error removing container %s: %v", con.ID, err)
+ logrus.Errorf("Removing container %s: %v", con.ID, err)
}
}
}