Apollo-android: Enable full logging

Created on 7 May 2019  路  2Comments  路  Source: apollographql/apollo-android

I see that I can log some internal log statements w/ Logger interface and then pipe them to something like Timber.

apolloClient = ApolloClient.builder()
        .serverUrl(baseUrl)
        .logger((priority, message, t, args) -> Timber.tag("Apollo").d(message, args))
        .build();
````

But I'm only seeing a few logs like this:

Cache MISS for operation com.example.api.GetSomethingQuery@df79fb2
```

How can I log the full json response?

Most helpful comment

If you want to log the network calls just provide the custom OkHttpClient in ApolloClient builder with the logging network interceptor.

All 2 comments

If you want to log the network calls just provide the custom OkHttpClient in ApolloClient builder with the logging network interceptor.

How should this be done? I would like to include a dependency thats compatible with the OkHttp versions used by Apollo?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

gmrandom picture gmrandom  路  4Comments

tasomaniac picture tasomaniac  路  4Comments

moritzmorgenroth picture moritzmorgenroth  路  4Comments

jsiva001 picture jsiva001  路  4Comments

TayfunCesur picture TayfunCesur  路  4Comments