Skip to content

Commit 2129e28

Browse files
committed
cmd/create, cmd/root, cmd/run: Tweak the debug logs for consistency
Debug logs are sweeter when they are shorter. #1258
1 parent fb15655 commit 2129e28

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

src/cmd/create.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ func createContainer(container, image, release, authFile string, showCommandToEn
345345
runMediaMount = []string{"--volume", "/run/media:/run/media:rslave"}
346346
}
347347

348-
logrus.Debug("Looking for toolbox.sh")
348+
logrus.Debug("Looking up toolbox.sh")
349349

350350
var toolboxShMount []string
351351

@@ -634,7 +634,7 @@ func getServiceSocket(serviceName string, unitName string) (string, error) {
634634

635635
func pullImage(image, release, authFile string) (bool, error) {
636636
if ok := utils.ImageReferenceCanBeID(image); ok {
637-
logrus.Debugf("Looking for image %s", image)
637+
logrus.Debugf("Looking up image %s", image)
638638

639639
if _, err := podman.ImageExists(image); err == nil {
640640
return true, nil
@@ -645,7 +645,7 @@ func pullImage(image, release, authFile string) (bool, error) {
645645

646646
if !hasDomain {
647647
imageLocal := "localhost/" + image
648-
logrus.Debugf("Looking for image %s", imageLocal)
648+
logrus.Debugf("Looking up image %s", imageLocal)
649649

650650
if _, err := podman.ImageExists(imageLocal); err == nil {
651651
return true, nil
@@ -664,7 +664,7 @@ func pullImage(image, release, authFile string) (bool, error) {
664664
}
665665
}
666666

667-
logrus.Debugf("Looking for image %s", imageFull)
667+
logrus.Debugf("Looking up image %s", imageFull)
668668

669669
if _, err := podman.ImageExists(imageFull); err == nil {
670670
return true, nil

src/cmd/root.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ func setUpLoggers() error {
389389
}
390390

391391
func validateSubIDRanges(cmd *cobra.Command, args []string, user *user.User) (bool, error) {
392-
logrus.Debugf("Looking for sub-GID and sub-UID ranges for user %s", user.Username)
392+
logrus.Debugf("Looking up sub-GID and sub-UID ranges for user %s", user.Username)
393393

394394
if user.Uid == "0" {
395395
logrus.Debugf("Look-up not needed: user %s doesn't need them", user.Username)
@@ -407,7 +407,7 @@ func validateSubIDRanges(cmd *cobra.Command, args []string, user *user.User) (bo
407407
}
408408

409409
if _, err := utils.ValidateSubIDRanges(user); err != nil {
410-
logrus.Debugf("Looking for sub-GID and sub-UID ranges: %s", err)
410+
logrus.Debugf("Looking up sub-GID and sub-UID ranges failed: %s", err)
411411
return false, newSubIDError()
412412
}
413413

src/cmd/run.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -556,7 +556,7 @@ func getEntryPointAndPID(container string) (string, int, error) {
556556
}
557557

558558
func isCommandPresent(container, command string) (bool, error) {
559-
logrus.Debugf("Looking for command %s in container %s", command, container)
559+
logrus.Debugf("Looking up command %s in container %s", command, container)
560560

561561
logLevelString := podman.LogLevel.String()
562562
args := []string{
@@ -575,7 +575,7 @@ func isCommandPresent(container, command string) (bool, error) {
575575
}
576576

577577
func isPathPresent(container, path string) (bool, error) {
578-
logrus.Debugf("Looking for path %s in container %s", path, container)
578+
logrus.Debugf("Looking up path %s in container %s", path, container)
579579

580580
logLevelString := podman.LogLevel.String()
581581
args := []string{

0 commit comments

Comments
 (0)