Skip to content

Commit

Permalink
Merge #120118
Browse files Browse the repository at this point in the history
120118: roachprod: use logger for `printDetails` r=nameisbhaskar,renatolabs a=herkolategan

A recent update to PrintDetails redirected output to `os.Stdout`, it should preferably write to the logger, in order for it to end up in the correct log when used with `roachtest`. This change points it to `logger.Stdout` instead.

See: #119763

Epic: None
Release Note: None

Co-authored-by: Herko Lategan <[email protected]>
  • Loading branch information
craig[bot] and herkolategan committed Mar 11, 2024
2 parents 8466258 + 1188249 commit fcf0b5a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pkg/roachprod/cloud/cluster_cloud.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import (
"bytes"
"context"
"fmt"
"os"
"regexp"
"sort"
"text/tabwriter"
Expand Down Expand Up @@ -180,7 +179,7 @@ func (c *Cluster) PrintDetails(logger *logger.Logger) error {
logger.Printf("(no expiration)")
}
// Align columns left and separate with at least two spaces.
tw := tabwriter.NewWriter(os.Stdout, 0, 8, 2, ' ', 0)
tw := tabwriter.NewWriter(logger.Stdout, 0, 8, 2, ' ', 0)
logPrettifiedHeader(tw, printDetailsColumnHeaders)

for _, vm := range c.VMs {
Expand Down

0 comments on commit fcf0b5a

Please sign in to comment.