Skip to content
This repository was archived by the owner on Mar 19, 2024. It is now read-only.

Commit dc39475

Browse files
committed
Add log interceptor disabled by default
1 parent b7fd663 commit dc39475

File tree

1 file changed

+1
-6
lines changed
  • owncloudComLibrary/src/main/java/com/owncloud/android/lib/common/http

1 file changed

+1
-6
lines changed

owncloudComLibrary/src/main/java/com/owncloud/android/lib/common/http/HttpClient.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626

2727
import android.content.Context;
2828

29-
import com.owncloud.android.lib.BuildConfig;
3029
import com.owncloud.android.lib.common.network.AdvancedX509TrustManager;
3130
import com.owncloud.android.lib.common.network.NetworkUtils;
3231
import okhttp3.Cookie;
@@ -112,6 +111,7 @@ public List<Cookie> loadForRequest(HttpUrl url) {
112111
};
113112

114113
OkHttpClient.Builder clientBuilder = new OkHttpClient.Builder()
114+
.addInterceptor(getLogInterceptor())
115115
.protocols(Arrays.asList(Protocol.HTTP_1_1))
116116
.readTimeout(HttpConstants.DEFAULT_DATA_TIMEOUT, TimeUnit.MILLISECONDS)
117117
.writeTimeout(HttpConstants.DEFAULT_DATA_TIMEOUT, TimeUnit.MILLISECONDS)
@@ -123,11 +123,6 @@ public List<Cookie> loadForRequest(HttpUrl url) {
123123
// TODO: Not verifying the hostname against certificate. ask owncloud security human if this is ok.
124124
//.hostnameVerifier(new BrowserCompatHostnameVerifier());
125125

126-
// Http logs enabled only in debug version. TODO: Add an option to enable and disable it.
127-
if (BuildConfig.DEBUG) {
128-
clientBuilder.addInterceptor(getLogInterceptor());
129-
}
130-
131126
sOkHttpClient = clientBuilder.build();
132127

133128
} catch (Exception e) {

0 commit comments

Comments
 (0)