Skip to content

Commit

Permalink
Changed collect messages to using JSON format
Browse files Browse the repository at this point in the history
  • Loading branch information
davidallendj committed Aug 22, 2024
1 parent 2e036c5 commit 0454735
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 0454735

Please sign in to comment.