Skip to content

Commit

Permalink
change user-facing logs to use job names instead of job specific params
Browse files Browse the repository at this point in the history
  • Loading branch information
arriven committed Jul 1, 2022
1 parent f3ec73c commit c6e3fd1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/job/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,6 @@ func fastHTTPJob(ctx context.Context, args config.Args, globalConfig *GlobalConf
}
}

logger.Info("attacking", zap.Any("target", jobConfig.Request["path"]))

for jobConfig.Next(ctx) {
if jobConfig.Dynamic {
if err := buildHTTPRequest(ctx, logger, requestTpl, &req); err != nil {
Expand Down
4 changes: 4 additions & 0 deletions src/job/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,10 @@ func (r *Runner) runJobs(ctx context.Context, cfg *config.MultiConfig, metric *m
ctx := context.WithValue(ctx, templates.ContextKey("config"), cfgMap)

for j := 0; j < cfg.Jobs[i].Count; j++ {
if cfg.Jobs[i].Name != "" {
logger.Info("Attacking", zap.String("target", cfg.Jobs[i].Name))
}

go func(i int) {
defer utils.PanicHandler(logger)

Expand Down

0 comments on commit c6e3fd1

Please sign in to comment.