tag1consulting / goose

Load testing framework, inspired by Locust
https://tag1.com/goose
Apache License 2.0
813 stars 71 forks source link

[Question] How can I get my own debug logs? #536

Closed lukehsiao closed 1 year ago

lukehsiao commented 1 year ago

Just starting with Goose and working on a simple login scenario, following the examples. I'm running into a tokio panic when trying to user.get_session_data_unchecked, but I'm unsure why.

I'd like to add some debug prints or logs, but it's not clear to me how to actually get that output with Goose. Could someone give me some pointers?

jeremyandrews commented 1 year ago

First, I recommend not using the _unchecked variation as that will panic if something is not right. Possibly you can look at the backtrack for full details.

Logging can be read about here: https://book.goose.rs/logging/overview.html

Specifically you’d be able to use the debug log: https://book.goose.rs/logging/debug.html

Development specific docs are here: https://docs.rs/goose/latest/goose/logger/index.html#writing-debug-logs

lukehsiao commented 1 year ago

Perfect, thanks!