Skip to content

Commit

Permalink
(feat): Ensured highlighted information is logged with logrus INFO …
Browse files Browse the repository at this point in the history
…level.

Signed-off-by: Camila Macedo <[email protected]>

Signed-off-by: Camila Macedo <[email protected]>
  • Loading branch information
camilamacedo86 committed Sep 28, 2023
1 parent d0dddc2 commit 7ff21ee
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion subcommands/common_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ func SetUpdatesConfig(opts *SetUpdatesConfigOptions, reportedTag string, reporte
}

if !changed {
fmt.Println("No changes found. Device is already configured with the specified options.")
logrus.Infof("No changes found. Device is already configured with the specified options.")
os.Exit(0)
}

Expand Down
4 changes: 2 additions & 2 deletions subcommands/login/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,12 @@ func doLogin(cmd *cobra.Command, args []string) {
} else if creds.Config.AccessToken == "" {
subcommands.DieNotNil(creds.Get())
} else {
fmt.Println("You are already logged in to Foundries.io services.")
logrus.Infof("You are already logged in to Foundries.io services.")
os.Exit(0)
}

subcommands.SaveOauthConfig(creds.Config)
fmt.Println("You are now logged in to Foundries.io services.")
logrus.Infof("You are now logged in to Foundries.io services.")
}

func promptForCreds(credsUrl string) (string, string) {
Expand Down
4 changes: 2 additions & 2 deletions subcommands/targets/edit.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func doEdit(cmd *cobra.Command, args []string) {
edit.Stdin = os.Stdin
logrus.Debug("Running editor and waiting for it to finish...")
if err := edit.Run(); err != nil {
fmt.Println("Editing cancelled: ", err)
logrus.Warning("Editing cancelled: ", err)
os.Exit(0)
}

Expand All @@ -75,7 +75,7 @@ func doEdit(cmd *cobra.Command, args []string) {
logrus.Error("ERROR: Unable to re-read tempfile:", err)
}
if bytes.Equal(content, orig) {
fmt.Println("No changes found, exiting.")
logrus.Infof("No changes found, exiting.")
os.Exit(0)
}

Expand Down
2 changes: 1 addition & 1 deletion subcommands/targets/prune.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ func doPrune(cmd *cobra.Command, args []string) {
target_names = append(target_names, names...)
}
} else {
fmt.Println("Nothing to prune")
logrus.Infof("Nothing to prune")
os.Exit(0)
}
}
Expand Down

0 comments on commit 7ff21ee

Please sign in to comment.