Closed sunnymopada closed 6 years ago
I have done it using call backs. It would be great if I get request payload as well in the RequesInformation object. Thank you!
builder.setErrorHandler(new ErrorHandler() {
@Override
public Throwable handleError(RetrofitError cause) {
Log.d("TAG", cause.getUrl() + ":" + cause.getMessage());
return cause;
}
});
builder.setProfiler(new Profiler() {
@Override
public Object beforeCall() {
return null;
}
@Override
public void afterCall(RequestInformation requestInfo, long elapsedTime, int statusCode, Object beforeCallData) {
Log.d("TAG",new Gson().toJson(requestInfo)+" : "+elapsedTime);
}
});
I would like to log time taking for each API called using robospice retrofit. And I would like configure this at one place. @stephanenicolas Any ideas?