[API] [CI] Output Curl traces on $stdout for the API tests when running in continuous integration

* Colorized logger when running without QUIET
* Curl tracer when running with CI
* Abstracted the call to logging device in `CapturedLogger`