tag1consulting / goose

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

how to log response body #596

Closed JimFuller-RedHat closed 3 months ago

JimFuller-RedHat commented 3 months ago

is there a built in way to log response bodies ?

JimFuller-RedHat commented 3 months ago

and while I am asking ... how to use GooseDefault::LogLevel

jeremyandrews commented 3 months ago

is there a built in way to log response bodies ?

Response bodies are only logged to the debug log (if this is not disabled), and that's in the case of error. For more detail see:

You could duplicate this logic to log all responses, if desired. Or perhaps you could even simply log succesful responses to your requests using the debug log.

and while I am asking ... how to use GooseDefault::LogLevel

The general idea is documented here:

JimFuller-RedHat commented 3 months ago

ah right, I wanted to log valid responses ... I guess we can use goose egg to validate (feel free to close this)

jeremyandrews commented 3 months ago

It's definitely possible, but not the typical use case so not done by default.