Skip to content

Commit

Permalink
Merge pull request #346 from mnotti/lb-strategy-logging-error
Browse files Browse the repository at this point in the history
fix lb strategy logging error
  • Loading branch information
bojand committed Apr 10, 2022
2 parents b97c010 + 4db2f0e commit 310c25f
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 310c25f

Please sign in to comment.