Skip to content

Commit b6418f4

Browse files
authored
Merge pull request #612 from cbosdo/full-welcome
Change the first message to include the full command
2 parents a6d703b + ca090e8 commit b6418f4

4 files changed

Lines changed: 9 additions & 7 deletions

File tree

mgradm/cmd/cmd.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ package cmd
77
import (
88
"os"
99
"path"
10+
"strings"
1011

1112
"github.com/rs/zerolog/log"
1213
"github.com/spf13/cobra"
@@ -64,9 +65,8 @@ func NewUyuniadmCommand() (*cobra.Command, error) {
6465
if cmd.Name() != "completion" {
6566
utils.LogInit(true)
6667
utils.SetLogLevel(globalFlags.LogLevel)
67-
log.Info().Msgf(L("Welcome to %s"), name)
68+
log.Info().Msgf(L("Starting %s"), strings.Join(os.Args, " "))
6869
log.Info().Msgf(L("Use of this software implies acceptance of the End User License Agreement."))
69-
log.Info().Msgf(L("Executing command: %s"), cmd.Name())
7070
}
7171
}
7272

mgrctl/cmd/cmd.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// SPDX-FileCopyrightText: 2024 SUSE LLC
1+
// SPDX-FileCopyrightText: 2025 SUSE LLC
22
//
33
// SPDX-License-Identifier: Apache-2.0
44

@@ -7,6 +7,7 @@ package cmd
77
import (
88
"os"
99
"path"
10+
"strings"
1011

1112
"github.com/rs/zerolog/log"
1213
"github.com/spf13/cobra"
@@ -45,8 +46,7 @@ func NewUyunictlCommand() *cobra.Command {
4546
if cmd.Name() != "completion" {
4647
utils.LogInit((cmd.Name() != "exec" && cmd.Name() != "term") || globalFlags.LogLevel == "trace")
4748
utils.SetLogLevel(globalFlags.LogLevel)
48-
log.Info().Msgf(L("Welcome to %s"), name)
49-
log.Info().Msgf(L("Executing command: %s"), cmd.Name())
49+
log.Info().Msgf(L("Starting %s"), strings.Join(os.Args, " "))
5050
}
5151
}
5252

mgrpxy/cmd/cmd.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ package cmd
77
import (
88
"os"
99
"path"
10+
"strings"
1011

1112
"github.com/rs/zerolog/log"
1213
"github.com/spf13/cobra"
@@ -58,9 +59,8 @@ func NewUyuniproxyCommand() (*cobra.Command, error) {
5859
if cmd.Name() != "completion" && cmd.Name() != "__complete" {
5960
utils.LogInit(true)
6061
utils.SetLogLevel(globalFlags.LogLevel)
61-
log.Info().Msgf(L("Welcome to %s"), name)
62+
log.Info().Msgf(L("Starting %s"), strings.Join(os.Args, " "))
6263
log.Info().Msgf(L("Use of this software implies acceptance of the End User License Agreement."))
63-
log.Info().Msgf(L("Executing command: %s"), cmd.Name())
6464
}
6565
}
6666

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
- Change the first message of each tool to include the full
2+
command and parameters

0 commit comments

Comments
 (0)