I am using retrofit 2.x and i want to log the header and body of request and response .
HttpLoggingInterceptor interceptor = new HttpLoggingInterceptor();
May it help someone ...
HttpLoggingInterceptor interceptor = new HttpLoggingInterceptor();
interceptor.setLevel(HttpLoggingInterceptor.Level.HEADERS);
interceptor.setLevel(HttpLoggingInterceptor.Level.BODY);
Add both to see complete logs and add this interceptor at the last (don't know why but its like this).