6
6
"github.com/spf13/cobra"
7
7
8
8
"github.com/stacklok/toolhive/pkg/config"
9
- "github.com/stacklok/toolhive/pkg/logger"
10
9
"github.com/stacklok/toolhive/pkg/secrets"
11
10
)
12
11
@@ -102,7 +101,7 @@ func secretsProviderCmdFunc(_ *cobra.Command, args []string) error {
102
101
return fmt .Errorf ("failed to save configuration: %w" , err )
103
102
}
104
103
105
- logger . Log . Info ( fmt .Sprintf ("Secrets provider type updated to: %s" , provider ) )
104
+ fmt .Printf ("Secrets provider type updated to: %s\n " , provider )
106
105
return nil
107
106
}
108
107
@@ -131,7 +130,7 @@ func autoDiscoveryCmdFunc(_ *cobra.Command, args []string) error {
131
130
return fmt .Errorf ("failed to save configuration: %w" , err )
132
131
}
133
132
134
- logger . Log . Info ( fmt .Sprintf ("Auto-discovery of MCP clients %s" , map [bool ]string {true : "enabled" , false : "disabled" }[enabled ]) )
133
+ fmt .Printf ("Auto-discovery of MCP clients %s\n " , map [bool ]string {true : "enabled" , false : "disabled" }[enabled ])
135
134
return nil
136
135
}
137
136
@@ -164,7 +163,7 @@ func registerClientCmdFunc(_ *cobra.Command, args []string) error {
164
163
return fmt .Errorf ("failed to save configuration: %w" , err )
165
164
}
166
165
167
- logger . Log . Info ( fmt .Sprintf ("Successfully registered client: %s" , client ) )
166
+ fmt .Printf ("Successfully registered client: %s\n " , client )
168
167
return nil
169
168
}
170
169
@@ -202,7 +201,7 @@ func removeClientCmdFunc(_ *cobra.Command, args []string) error {
202
201
return fmt .Errorf ("failed to save configuration: %w" , err )
203
202
}
204
203
205
- logger . Log . Info ( fmt .Sprintf ("Successfully removed client: %s" , client ) )
204
+ fmt .Printf ("Successfully removed client: %s\n " , client )
206
205
return nil
207
206
}
208
207
@@ -212,14 +211,14 @@ func listRegisteredClientsCmdFunc(_ *cobra.Command, _ []string) error {
212
211
213
212
// Check if there are any registered clients
214
213
if len (cfg .Clients .RegisteredClients ) == 0 {
215
- logger . Log . Info ("No clients are currently registered." )
214
+ fmt . Println ("No clients are currently registered." )
216
215
return nil
217
216
}
218
217
219
218
// Print the list of registered clients
220
- logger . Log . Info ("Registered clients:" )
219
+ fmt . Println ("Registered clients:" )
221
220
for _ , client := range cfg .Clients .RegisteredClients {
222
- logger . Log . Info ( fmt .Sprintf (" - %s" , client ) )
221
+ fmt .Printf (" - %s\n " , client )
223
222
}
224
223
225
224
return nil
0 commit comments