I'm trying to configure locust to store my log files into a a logs/
directory. For example:
# example.conf
locustfile = example/locust.py
host = http://www.example.com
users = 10
spawn-rate = 10
logfile = logs/example.log
However, locust will fail if the logs/
directory does not exist. I've tried adding the directory with an init event listener:
@events.init.add_listener
def on_init(**kw):
if 'logs' not in os.listdir():
os.mkdir('logs')
But locust fails before it gets to this point. Is there any way around this issue with the current way locust is built?