aboutsummaryrefslogtreecommitdiff
path: root/cmd/podman
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 /cmd/podman
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 'cmd/podman')
-rw-r--r--cmd/podman/containers/cleanup.go8
-rw-r--r--cmd/podman/images/build.go14
-rw-r--r--cmd/podman/images/utils_linux.go4
-rw-r--r--cmd/podman/inspect/inspect.go2
-rw-r--r--cmd/podman/root.go6
-rw-r--r--cmd/podman/system/service.go4
6 files changed, 19 insertions, 19 deletions
diff --git a/cmd/podman/containers/cleanup.go b/cmd/podman/containers/cleanup.go
index 98706c575..a3d339358 100644
--- a/cmd/podman/containers/cleanup.go
+++ b/cmd/podman/containers/cleanup.go
@@ -80,7 +80,7 @@ func cleanup(cmd *cobra.Command, args []string) error {
// is via syslog.
// As such, we need to logrus.Errorf our errors to ensure they
// are properly printed if --syslog is set.
- logrus.Errorf("Error running container cleanup: %v", err)
+ logrus.Errorf("Running container cleanup: %v", err)
return err
}
for _, r := range responses {
@@ -89,15 +89,15 @@ func cleanup(cmd *cobra.Command, args []string) error {
continue
}
if r.RmErr != nil {
- logrus.Errorf("Error removing container: %v", r.RmErr)
+ logrus.Errorf("Removing container: %v", r.RmErr)
errs = append(errs, r.RmErr)
}
if r.RmiErr != nil {
- logrus.Errorf("Error removing image: %v", r.RmiErr)
+ logrus.Errorf("Removing image: %v", r.RmiErr)
errs = append(errs, r.RmiErr)
}
if r.CleanErr != nil {
- logrus.Errorf("Error cleaning up container: %v", r.CleanErr)
+ logrus.Errorf("Cleaning up container: %v", r.CleanErr)
errs = append(errs, r.CleanErr)
}
}
diff --git a/cmd/podman/images/build.go b/cmd/podman/images/build.go
index 642da0c83..4c563ed27 100644
--- a/cmd/podman/images/build.go
+++ b/cmd/podman/images/build.go
@@ -131,7 +131,7 @@ func buildFlags(cmd *cobra.Command) {
// --pull flag
flag := budFlags.Lookup("pull")
if err := flag.Value.Set("true"); err != nil {
- logrus.Errorf("unable to set --pull to true: %v", err)
+ logrus.Errorf("Unable to set --pull to true: %v", err)
}
flag.DefValue = "true"
flag.Usage = "Always attempt to pull the image (errors are fatal)"
@@ -148,13 +148,13 @@ func buildFlags(cmd *cobra.Command) {
useLayersVal := useLayers()
buildOpts.Layers = useLayersVal == "true"
if err := flag.Value.Set(useLayersVal); err != nil {
- logrus.Errorf("unable to set --layers to %v: %v", useLayersVal, err)
+ logrus.Errorf("Unable to set --layers to %v: %v", useLayersVal, err)
}
flag.DefValue = useLayersVal
// --force-rm flag
flag = layerFlags.Lookup("force-rm")
if err := flag.Value.Set("true"); err != nil {
- logrus.Errorf("unable to set --force-rm to true: %v", err)
+ logrus.Errorf("Unable to set --force-rm to true: %v", err)
}
flag.DefValue = "true"
flags.AddFlagSet(&layerFlags)
@@ -162,7 +162,7 @@ func buildFlags(cmd *cobra.Command) {
// FromAndBud flags
fromAndBudFlags, err := buildahCLI.GetFromAndBudFlags(&buildOpts.FromAndBudResults, &buildOpts.UserNSResults, &buildOpts.NameSpaceResults)
if err != nil {
- logrus.Errorf("error setting up build flags: %v", err)
+ logrus.Errorf("Setting up build flags: %v", err)
os.Exit(1)
}
// --http-proxy flag
@@ -171,7 +171,7 @@ func buildFlags(cmd *cobra.Command) {
flag = fromAndBudFlags.Lookup("http-proxy")
buildOpts.HTTPProxy = false
if err := flag.Value.Set("false"); err != nil {
- logrus.Errorf("unable to set --https-proxy to %v: %v", false, err)
+ logrus.Errorf("Unable to set --https-proxy to %v: %v", false, err)
}
flag.DefValue = "false"
}
@@ -184,7 +184,7 @@ func buildFlags(cmd *cobra.Command) {
flag = flags.Lookup("isolation")
buildOpts.Isolation = buildahDefine.OCI
if err := flag.Value.Set(buildahDefine.OCI); err != nil {
- logrus.Errorf("unable to set --isolation to %v: %v", buildahDefine.OCI, err)
+ logrus.Errorf("Unable to set --isolation to %v: %v", buildahDefine.OCI, err)
}
flag.DefValue = buildahDefine.OCI
_ = flags.MarkHidden("disable-content-trust")
@@ -228,7 +228,7 @@ func build(cmd *cobra.Command, args []string) error {
// Delete it later.
defer func() {
if err = os.RemoveAll(tempDir); err != nil {
- logrus.Errorf("error removing temporary directory %q: %v", contextDir, err)
+ logrus.Errorf("Removing temporary directory %q: %v", contextDir, err)
}
}()
contextDir = filepath.Join(tempDir, subDir)
diff --git a/cmd/podman/images/utils_linux.go b/cmd/podman/images/utils_linux.go
index 5521abab4..f7c159415 100644
--- a/cmd/podman/images/utils_linux.go
+++ b/cmd/podman/images/utils_linux.go
@@ -24,7 +24,7 @@ func setupPipe() (string, func() <-chan error, error) {
err = unix.Mkfifo(pipePath, 0600)
if err != nil {
if e := os.RemoveAll(pipeDir); e != nil {
- logrus.Errorf("error removing named pipe: %q", e)
+ logrus.Errorf("Removing named pipe: %q", e)
}
return "", nil, errors.Wrapf(err, "error creating named pipe")
}
@@ -40,7 +40,7 @@ func setupPipe() (string, func() <-chan error, error) {
}()
return pipePath, func() <-chan error {
if e := os.RemoveAll(pipeDir); e != nil {
- logrus.Errorf("error removing named pipe: %q", e)
+ logrus.Errorf("Removing named pipe: %q", e)
}
return errc
}, nil
diff --git a/cmd/podman/inspect/inspect.go b/cmd/podman/inspect/inspect.go
index 4c7fa33a4..64b586388 100644
--- a/cmd/podman/inspect/inspect.go
+++ b/cmd/podman/inspect/inspect.go
@@ -220,7 +220,7 @@ func (i *inspector) inspect(namesOrIDs []string) error {
err = printTmpl(tmpType, row, data)
}
if err != nil {
- logrus.Errorf("Error printing inspect output: %v", err)
+ logrus.Errorf("Printing inspect output: %v", err)
}
if len(errs) > 0 {
diff --git a/cmd/podman/root.go b/cmd/podman/root.go
index 02e6dcd27..58cab0268 100644
--- a/cmd/podman/root.go
+++ b/cmd/podman/root.go
@@ -175,7 +175,7 @@ func persistentPreRunE(cmd *cobra.Command, args []string) error {
// Hard code TMPDIR functions to use /var/tmp, if user did not override
if _, ok := os.LookupEnv("TMPDIR"); !ok {
if tmpdir, err := cfg.ImageCopyTmpDir(); err != nil {
- logrus.Warnf("failed to retrieve default tmp dir: %s", err.Error())
+ logrus.Warnf("Failed to retrieve default tmp dir: %s", err.Error())
} else {
os.Setenv("TMPDIR", tmpdir)
}
@@ -313,7 +313,7 @@ func rootFlags(cmd *cobra.Command, opts *entities.PodmanConfig) {
pFlags := cmd.PersistentFlags()
if registry.IsRemote() {
if err := lFlags.MarkHidden("remote"); err != nil {
- logrus.Warnf("unable to mark --remote flag as hidden: %s", err.Error())
+ logrus.Warnf("Unable to mark --remote flag as hidden: %s", err.Error())
}
opts.Remote = true
} else {
@@ -387,7 +387,7 @@ func rootFlags(cmd *cobra.Command, opts *entities.PodmanConfig) {
"trace",
} {
if err := pFlags.MarkHidden(f); err != nil {
- logrus.Warnf("unable to mark %s flag as hidden: %s", f, err.Error())
+ logrus.Warnf("Unable to mark %s flag as hidden: %s", f, err.Error())
}
}
}
diff --git a/cmd/podman/system/service.go b/cmd/podman/system/service.go
index d6fe8837b..99a6b1e1e 100644
--- a/cmd/podman/system/service.go
+++ b/cmd/podman/system/service.go
@@ -74,7 +74,7 @@ func service(cmd *cobra.Command, args []string) error {
if err != nil {
return err
}
- logrus.Infof("using API endpoint: '%s'", apiURI)
+ logrus.Infof("Using API endpoint: '%s'", apiURI)
// Clean up any old existing unix domain socket
if len(apiURI) > 0 {
uri, err := url.Parse(apiURI)
@@ -120,7 +120,7 @@ func resolveAPIURI(_url []string) (string, error) {
case len(_url) > 0 && _url[0] != "":
return _url[0], nil
case systemd.SocketActivated():
- logrus.Info("using systemd socket activation to determine API endpoint")
+ logrus.Info("Using systemd socket activation to determine API endpoint")
return "", nil
case rootless.IsRootless():
xdg, err := util.GetRuntimeDir()