Set restAssured to log all requests and responses globally : <p>I want to enable logging for all restAssured responses and requests by default.</p>

<p>Here's what I do:</p>

<pre><code>RestAssured.requestSpecification = new RequestSpecBuilder().
        setBaseUri("api").
        setContentType(ContentType.JSON).
        build().
        log().all();
RestAssured.responseSpecification = new ResponseSpecBuilder().
        build().
        log().all();
</code></pre>

<p>requestSpecification works alright, but with responseSpecification I get:</p>

<blockquote>
  <p>Cannot configure logging since request specification is not defined.
  You may be misusing the API.</p>
</blockquote>

<p>I really don't want to use log().all() after each then.</p>
