Skip to content

Commit

Permalink
Merge pull request #53 from OpenCHAMI/minor-changes
Browse files Browse the repository at this point in the history
Change collect messages to use JSON format
  • Loading branch information
davidallendj authored Aug 22, 2024
2 parents 76b6f37 + 39a30d1 commit 904d157
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pkg/client/smd.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ package client
import (
"fmt"
"net/http"

"github.com/rs/zerolog/log"
)

type SmdClient struct {
Expand Down Expand Up @@ -46,7 +48,7 @@ func (c SmdClient) Add(data HTTPBody, headers HTTPHeader) error {
return fmt.Errorf("returned status code %d when adding endpoint", res.StatusCode)
}
}
fmt.Printf("%v (%v)\n%s\n", url, res.Status, string(body))
log.Debug().Msgf("%v (%v)\n%s\n", url, res.Status, string(body))
}
return err
}
Expand All @@ -67,7 +69,7 @@ func (c SmdClient) Update(data HTTPBody, headers HTTPHeader) error {
return fmt.Errorf("failed to update redfish endpoint (returned %s)", res.Status)
}
}
fmt.Printf("%v (%v)\n%s\n", url, res.Status, string(body))
log.Debug().Msgf("%v (%v)\n%s\n", url, res.Status, string(body))
}
return err
}

0 comments on commit 904d157

Please sign in to comment.