Skip to content

Commit

Permalink
adjust logging for config gen
Browse files Browse the repository at this point in the history
  • Loading branch information
0pcom committed Feb 9, 2024
1 parent 6a267d3 commit f51f3ce
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmd/skywire-cli/commands/config/gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,9 @@ var genConfigCmd = &cobra.Command{
client := http.Client{
Timeout: time.Second * 15, // Timeout after 15 seconds
}
if !isStdout {
log.Infof("Fetching service endpoints from '%s'", serviceConfURL)
}
// Make the HTTP GET request
res, err := client.Get(fmt.Sprint(serviceConfURL))
if err != nil {
Expand All @@ -425,9 +428,6 @@ var genConfigCmd = &cobra.Command{
log.Warn("Falling back on hardcoded servers")
}
} else {
if !isStdout {
log.Infof("Fetched service endpoints from '%s'", serviceConfURL)
}
if res.Body != nil {
defer res.Body.Close() //nolint
}
Expand Down

0 comments on commit f51f3ce

Please sign in to comment.