Skip to content

Commit

Permalink
minor logging fixes
Browse files Browse the repository at this point in the history
Signed-off-by: Jonathan Holloway <[email protected]>
  • Loading branch information
loadtheaccumulator authored and lzap committed Sep 27, 2024
1 parent ca3a7f0 commit afc7b5b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 1 addition & 3 deletions pkg/clients/imagebuilder/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,6 @@ func (c *Client) GetComposeStatus(jobID string) (*ComposeStatus, error) {
c.log.WithFields(log.Fields{
"statusCode": res.StatusCode,
"responseBody": string(body),
"error": err,
}).Error("Error compose status HTTP response not StatusOK")

return nil, fmt.Errorf("request for status was not successful")
Expand All @@ -473,8 +472,7 @@ func (c *Client) GetComposeStatus(jobID string) (*ComposeStatus, error) {
c.log.WithFields(log.Fields{
"statusCode": res.StatusCode,
"responseBody": string(body),
"error": err,
}).Info("Image Builder ComposeStatus Response")
}).Info("ImageBuilder ComposeStatus successful response")
}

return cs, nil
Expand Down
4 changes: 3 additions & 1 deletion pkg/services/images.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (
"fmt"
"io"
"net/http"
"net/url"
"os"
"os/signal"
"path/filepath"
Expand Down Expand Up @@ -891,7 +892,8 @@ func (s *ImageService) CreateRepoForImage(ctx context.Context, img *models.Image
return nil, err
}

s.log.WithField("url", repository.URL).Info("OSTree repo is ready")
parsedURL, _ := url.Parse(repository.URL)
s.log.WithField("url", parsedURL.Redacted()).Info("OSTree repo is ready")

return repository, nil
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/services/repostore/pulpstore.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ func fileRepoImport(ctx context.Context, pulpService *pulp.PulpService, sourceUR
return "", "", err
}

log.WithContext(ctx).Info("File repo found or created: ", fileRepo)
log.WithContext(ctx).WithField("file_repo", fileRepo).Info("File repo found or created")

artifact, version, err := pulpService.FileRepositoriesImport(ctx, fileRepo, sourceURL)
if err != nil {
Expand Down

0 comments on commit afc7b5b

Please sign in to comment.