-
-
Notifications
You must be signed in to change notification settings - Fork 41
ParseLogInterceptor
ParseLogInterceptor can log the http requests and responses between Parse SDK and Parse server to Android logcat.
You can follow this tutorial to add ParseLogInterceptor to your app.
Check the website and getting started about how to setup Parse.
In your app's build.gradle, add dependency from maven.
dependencies {
compile 'com.parse:parse-android:1.14.0'
debugCompile 'com.parse:parseinterceptors:0.0.2'
// If you are using okhttp in your app, make sure you use 2.5.0 or above
// compile com.squareup.okhttp:okhttp:2.5.0
}In you app's Application#oncreate(), initialize a ParseLogInterceptor and add it to Parse. Make sure you add ParseLogInterceptor before you initialize Parse.
Parse.addParseNetworkInterceptor(new ParseLogInterceptor());
// Interceptor should be added before your initialize Parse
Parse.initialize(this); After Parse SDK sends http requests to Parse server, you can check the http requests and responses information in Android logcat. In your command line tool, you can run
adb logcat -s ParseLogInterceptor
then you will see

Right now, ParseLogInterceptor only prints json or plain string http body to Android logcat. If you upload/download using a ParseFile, the http body will be ignored.