diff --git a/CHANGELOG.md b/CHANGELOG.md index b638836cf..0408b63e5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ All notable changes to the LaunchDarkly Java SDK will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org). +## [2.0.10] - 2017-02-06 +### Changed +- Updated okhttp-eventsource dependency to bring in newer okhttp dependency +- Added more verbose debug level logging when sending events + ## [2.0.9] - 2017-01-24 ### Changed - StreamProcessor uses the proxy configuration specified by LDConfig. diff --git a/README.md b/README.md index 13720c22e..8804a84e6 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,15 @@ Your first feature flag // the code to run if the feature is off } + +Logging +------- +The LaunchDarkly SDK uses [SLF4J](https://www.slf4j.org/). For an example configuration check out the [hello-java](https://github.com/launchdarkly/hello-java) project. + +Be aware of two considerations when enabling the DEBUG log level: +1. Debug-level logs can be very verbose. It is not recommended that you turn on debug logging in high-volume environments. +1. Potentially sensitive information is logged including LaunchDarkly users created by you in your usage of this SDK. + Learn more ---------- diff --git a/build.gradle b/build.gradle index 51236c456..f7c76d7dd 100644 --- a/build.gradle +++ b/build.gradle @@ -19,7 +19,7 @@ repositories { allprojects { group = 'com.launchdarkly' - version = "2.0.9" + version = "2.0.10" sourceCompatibility = 1.7 targetCompatibility = 1.7 } @@ -32,7 +32,7 @@ dependencies { compile "com.google.guava:guava:19.0" compile "joda-time:joda-time:2.9.3" compile "org.slf4j:slf4j-api:1.7.21" - compile group: "com.launchdarkly", name: "okhttp-eventsource", version: "1.1.0", changing: true + compile group: "com.launchdarkly", name: "okhttp-eventsource", version: "1.1.1", changing: true compile "redis.clients:jedis:2.9.0" testCompile "org.easymock:easymock:3.4" testCompile 'junit:junit:4.12' diff --git a/src/main/java/com/launchdarkly/client/EventProcessor.java b/src/main/java/com/launchdarkly/client/EventProcessor.java index c7ae5e84d..8659f4ce3 100644 --- a/src/main/java/com/launchdarkly/client/EventProcessor.java +++ b/src/main/java/com/launchdarkly/client/EventProcessor.java @@ -80,10 +80,10 @@ public void flush() { } private void postEvents(List events) { - logger.debug("Posting " + events.size() + " event(s) to " + config.eventsURI); CloseableHttpResponse response = null; Gson gson = new Gson(); String json = gson.toJson(events); + logger.debug("Posting " + events.size() + " event(s) to " + config.eventsURI + " with payload: " + json); HttpPost request = config.postEventsRequest(sdkKey, "/bulk"); StringEntity entity = new StringEntity(json, "UTF-8"); diff --git a/src/main/java/com/launchdarkly/client/StreamProcessor.java b/src/main/java/com/launchdarkly/client/StreamProcessor.java index fa792d695..a27d444db 100644 --- a/src/main/java/com/launchdarkly/client/StreamProcessor.java +++ b/src/main/java/com/launchdarkly/client/StreamProcessor.java @@ -65,6 +65,10 @@ public Future start() { public void onOpen() throws Exception { } + @Override + public void onClosed() throws Exception { + } + @Override public void onMessage(String name, MessageEvent event) throws Exception { lastHeartbeat = DateTime.now();