Skip to content

Commit

Permalink
fix lb strategy logging error
Browse files Browse the repository at this point in the history
  • Loading branch information
mnotti committed Mar 16, 2022
1 parent 28249ed commit 2352ffb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/ghz/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -315,8 +315,8 @@ func main() {
options = append(options, runner.WithLogger(logger))
}

if isLBStrategySet && cfg.Host != "" && !strings.HasPrefix(cfg.Host, "dns:///") {
logger.Warn("Load balancing strategy set without using DNS (dns:///) scheme. ", "Strategy: ", cfg.LBStrategy, " Host: ", cfg.Host)
if logger != nil && isLBStrategySet && cfg.Host != "" && !strings.HasPrefix(cfg.Host, "dns:///") {
logger.Warnw("Load balancing strategy set without using DNS (dns:///) scheme. ", "strategy", cfg.LBStrategy, "host", cfg.Host)
}

if logger != nil {
Expand Down

0 comments on commit 2352ffb

Please sign in to comment.