From e2b7e64c8e799660c7d71d3a2532c32dffced63f Mon Sep 17 00:00:00 2001 From: Olivier FAURAX Date: Thu, 9 Nov 2023 18:29:08 +0100 Subject: [PATCH] Use fmt for traces --- providers/asrockrack/helpers.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/providers/asrockrack/helpers.go b/providers/asrockrack/helpers.go index 7b01ed7d..eea8417b 100644 --- a/providers/asrockrack/helpers.go +++ b/providers/asrockrack/helpers.go @@ -233,13 +233,13 @@ func (a *ASRockRack) uploadFirmware(ctx context.Context, endpoint string, fwRead // initiate a mulitpart writer form := multipart.NewWriter(pipeWriter) - a.log.V(2).Info("Launching go routine") + fmt.Println("Launching go routine") errCh := make(chan error, 1) go func() { defer pipeWriter.Close() - a.log.V(2).Info("CreateFormFile") + fmt.Println("CreateFormFile") // create form part part, err := form.CreateFormFile(fieldName, fileName) if err != nil { @@ -247,7 +247,7 @@ func (a *ASRockRack) uploadFirmware(ctx context.Context, endpoint string, fwRead return } - a.log.V(2).Info("Copy from reader") + fmt.Println("Copy from reader") // copy from source into form part writer _, err = io.Copy(part, fwReader) if err != nil { @@ -255,10 +255,10 @@ func (a *ASRockRack) uploadFirmware(ctx context.Context, endpoint string, fwRead return } - a.log.V(2).Info("Before Close") + fmt.Println("Before Close") // add terminating boundary to multipart form errCh <- form.Close() - a.log.V(2).Info("After Close") + fmt.Println("After Close") }() // multi-part content type @@ -266,7 +266,7 @@ func (a *ASRockRack) uploadFirmware(ctx context.Context, endpoint string, fwRead "Content-Type": form.FormDataContentType(), } - a.log.V(2).Info("After headers") + fmt.Println("After headers") //<-errCh //mybytes, err := io.ReadAll(pipeReader)