Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HttpLoggingInterceptor not logging on android release builds

Tags:

android

okhttp

I have an issue with the places API on the release build of my app and it would help me a lot if I could see the logs coming from the OkHttpClient. I am adding a HttpLoggingInterceptor to it, but I can only see the logs on debug builds. How can I see them on release builds?

like image 795
Analizer Avatar asked Jul 03 '18 08:07

Analizer


1 Answers

Please check your code, I think you have added like this thats why its happen

if (BuildConfig.DEBUG) {  
    HttpLoggingInterceptor logging = new HttpLoggingInterceptor();
    logging.setLevel(Level.BODY);
    httpClient.addInterceptor(logging);
}

or post your code here

like image 78
Vinay Rathod Avatar answered Sep 29 '22 08:09

Vinay Rathod