diff --git a/cmd/cloud-init-server/instance_data.go b/cmd/cloud-init-server/instance_data.go index 4b7c2f5..dfd121f 100644 --- a/cmd/cloud-init-server/instance_data.go +++ b/cmd/cloud-init-server/instance_data.go @@ -9,6 +9,7 @@ import ( "github.com/OpenCHAMI/cloud-init/internal/smdclient" "github.com/OpenCHAMI/cloud-init/pkg/citypes" + "github.com/rs/zerolog/log" ) // The instance-data endpoint should return information about the instance. @@ -60,11 +61,11 @@ func InstanceDataHandler(smd smdclient.SMDClientInterface, clusterName string) h // Get the component information from the SMD client id, err := smd.IDfromIP(ip) if err != nil { - fmt.Print(err) + log.Print(err) w.WriteHeader(http.StatusUnprocessableEntity) return } else { - fmt.Printf("xname %s with ip %s found\n", id, ip) + log.Printf("xname %s with ip %s found\n", id, ip) } smdComponent, err := smd.ComponentInformation(id) if err != nil { diff --git a/internal/smdclient/SMDclient.go b/internal/smdclient/SMDclient.go index bb04d8b..9ab8f8d 100644 --- a/internal/smdclient/SMDclient.go +++ b/internal/smdclient/SMDclient.go @@ -144,7 +144,6 @@ func (s *SMDClient) getSMD(ep string, smd interface{}) error { } defer resp.Body.Close() body, err := io.ReadAll(resp.Body) - log.Info().Msgf("body: %s", string(body)) if err != nil { log.Error().Err(err).Msg("failed to read response body") return err