Skip to content

Commit

Permalink
fix: fix log format in cluster provisioning
Browse files Browse the repository at this point in the history
We missed passing the log formatting options while printing logs in a couple places, causing the logs to be in inconsistent format.

Signed-off-by: Utku Ozdemir <utku.ozdemir@siderolabs.com>
  • Loading branch information
utkuozdemir committed Jul 16, 2024
1 parent ea626a9 commit 980f9eb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/provision/providers/qemu/preflight.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ func (check *preflightCheckContext) cniDirectories(ctx context.Context) error {
return fmt.Errorf("error checking CNI directory %q: %w", cniDir, err)
}

fmt.Fprintf(os.Stderr, "creating %q\n", cniDir)
fmt.Fprintf(check.options.LogWriter, "creating %q\n", cniDir)

err = os.MkdirAll(cniDir, 0o777)
if err != nil {
Expand Down Expand Up @@ -181,7 +181,7 @@ func (check *preflightCheckContext) cniBundle(ctx context.Context) error {
src := strings.ReplaceAll(check.request.Network.CNI.BundleURL, constants.ArchVariable, runtime.GOARCH)
dst := check.request.Network.CNI.BinPath[0]

fmt.Fprintf(os.Stderr, "downloading CNI bundle from %q to %q\n", src, dst)
fmt.Fprintf(check.options.LogWriter, "downloading CNI bundle from %q to %q\n", src, dst)

_, err = client.Get(ctx, &getter.Request{
Src: src,
Expand Down

0 comments on commit 980f9eb

Please sign in to comment.