xjlin
xjlin

Reputation: 11

Cannot set content of locust.stats_logger into log file

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?

Upvotes: 0

Views: 311

Answers (1)

Solowalker
Solowalker

Reputation: 2866

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?

Upvotes: 0

Related Questions