avaje/avaje-http-client

By default register RequestLogger - add HttpClientContext.requestLogging(boolean) to enable disable

Closed this issue · 0 comments

That is, the majority of the time we want request response logging with the ability to control via DEBUG/TRACE level of io.avaje.http.client.RequestLogger.

So this change makes the default to have logging and I think makes this makes sense.

To turn off automatic registering of RequestLogger we need to use .requestLogging(false)

    final HttpClientContext clientContext = HttpClientContext.newBuilder()
      .baseUrl("https://api.github.com")
      .bodyAdapter(bodyAdapter)
      .requestLogging(false)
      .build();