Skip to content

Commit

Permalink
Avoid printing wrong information for --once.
Browse files Browse the repository at this point in the history
  • Loading branch information
Sven Rebhan committed Dec 2, 2021
1 parent 445841a commit dce7b5b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/telegraf/telegraf.go
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ func runAgent(ctx context.Context,
log.Printf("I! Loaded inputs: %s", strings.Join(c.InputNames(), " "))
log.Printf("I! Loaded aggregators: %s", strings.Join(c.AggregatorNames(), " "))
log.Printf("I! Loaded processors: %s", strings.Join(c.ProcessorNames(), " "))
if *fTest || *fTestWait != 0 {
if !*fRunOnce && (*fTest || *fTestWait != 0) {
log.Print(color.RedString("W! Outputs are not used in testing mode!"))
} else {
log.Printf("I! Loaded outputs: %s", strings.Join(c.OutputNames(), " "))
Expand Down

0 comments on commit dce7b5b

Please sign in to comment.