diff --git a/README.md b/README.md
index bdb2d75..6656310 100644
--- a/README.md
+++ b/README.md
@@ -24,7 +24,7 @@ For Maven users, add dependency to your `pom.xml`:
com.moesif
moesif-okhttp-interceptor
- 1.1.1
+ 1.1.6
```
For Gradle users, add to your project's build.gradle file:
@@ -32,7 +32,7 @@ For Gradle users, add to your project's build.gradle file:
```gradle
repositories {
dependencies {
- implementation 'com.moesif:moesif-okhttp-interceptor:1.1.1'
+ implementation 'com.moesif:moesif-okhttp-interceptor:1.1.6'
}
```
@@ -179,6 +179,7 @@ To use this custom config, update it prior to constructing the interceptor
```java
MoesifApiConnConfig cfg = new MoesifApiConnConfig();
cfg.setEventFilterConfig(new MyCustomEventFilterConfig());
+cfg.setDebug(false);
MoesifOkHttp3Interceptor interceptor = new MoesifOkHttp3Interceptor(cfg);
```
diff --git a/pom.xml b/pom.xml
index b21f088..9c1e641 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,7 +6,7 @@
com.moesif
moesif-okhttp-interceptor
- 1.1.6
+ 1.1.7
jar
moesif-okhttp-interceptor
https://www.moesif.com
diff --git a/src/main/java/com/moesif/sdk/okhttp3client/MoesifOkHttp3Interceptor.java b/src/main/java/com/moesif/sdk/okhttp3client/MoesifOkHttp3Interceptor.java
index b94fcc6..dcfc8a8 100644
--- a/src/main/java/com/moesif/sdk/okhttp3client/MoesifOkHttp3Interceptor.java
+++ b/src/main/java/com/moesif/sdk/okhttp3client/MoesifOkHttp3Interceptor.java
@@ -95,12 +95,15 @@ public MoesifOkHttp3Interceptor(MoesifApiConnConfig connConfig) {
}
public void init(MoesifApiConnConfig connConfig) {
- this.connConfig = (null == connConfig)
+ MoesifOkHttp3Interceptor.connConfig = (null == connConfig)
? new MoesifApiConnConfig() : connConfig;
+ if (getConnConfig().isDebug()) {
+ logger.debug("MoesifOkHttp3Interceptor initialized with config: {}", getConnConfig());
+ }
}
public MoesifApiConnConfig getConnConfig(){
- return this.connConfig;
+ return connConfig;
}
/**
diff --git a/src/main/java/com/moesif/sdk/okhttp3client/config/MoesifApiConnConfig.java b/src/main/java/com/moesif/sdk/okhttp3client/config/MoesifApiConnConfig.java
index 26bbf52..8efa91a 100755
--- a/src/main/java/com/moesif/sdk/okhttp3client/config/MoesifApiConnConfig.java
+++ b/src/main/java/com/moesif/sdk/okhttp3client/config/MoesifApiConnConfig.java
@@ -11,17 +11,14 @@
public class MoesifApiConnConfig {
public static String DEFAULT_BASE_URI = "https://api.moesif.net";
- public String baseUri;
+ public String baseUri;
public Integer eventsBufferSize = 5;
- private IInterceptEventFilter eventFilterConfig;
-
-
- public Collection bodyContentTypesBlackList =
- DefaultDomainData.bodyContentTypesBlackList;
-
+ public Collection bodyContentTypesBlackList = DefaultDomainData.bodyContentTypesBlackList;
private String applicationId;
+ private IInterceptEventFilter eventFilterConfig;
+ private boolean debug;
public MoesifApiConnConfig() {
init(null, null);
@@ -30,6 +27,7 @@ public MoesifApiConnConfig() {
public MoesifApiConnConfig(String moesifApplicationId) {
init(moesifApplicationId, null);
}
+
public MoesifApiConnConfig(String applicationId, String baseUri) {
init(applicationId, baseUri);
}
@@ -142,4 +140,23 @@ public void setEventFilterConfig(IInterceptEventFilter eventFilterConfig) {
: eventFilterConfig;
}
+ public boolean isDebug() {
+ return debug;
+ }
+
+ public void setDebug(boolean debug) {
+ this.debug = debug;
+ }
+
+ @Override
+ public String toString() { // produce a log friendly single-line string representation of the config
+ return "MoesifApiConnConfig{" +
+ "baseUri='" + baseUri + '\'' +
+ ", eventsBufferSize=" + eventsBufferSize +
+ ", eventFilterConfig=" + eventFilterConfig +
+ ", bodyContentTypesBlackList=" + bodyContentTypesBlackList +
+ ", applicationId='" + applicationId + '\'' +
+ ", debug=" + debug +
+ '}';
+ }
}