0

In locust Docs, https://docs.locust.io/en/stable/logging.html.

locust.stats_logger is used to periodically print the current stats to the console. The stats does not go into the log file when --logfile is used by default.So I set --logfile args in console.

locust -f mylocust.py --headless -t 10s -L=DEBUG --logfile=output.txt

But in output.txt,I only get the locust log.How can I get the output of locust.stats_logger in logfile?

xjlin
  • 21
  • 6

1 Answers1

0

Easiest way would just be to direct the output of the command to the same file. That's what I do. Check this out: How to redirect and append both stdout and stderr to a file with Bash?

Solowalker
  • 2,431
  • 8
  • 13