Skip to content
This repository was archived by the owner on May 30, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
----------

Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ repositories {

allprojects {
group = 'com.launchdarkly'
version = "2.0.9"
version = "2.0.10"
sourceCompatibility = 1.7
targetCompatibility = 1.7
}
Expand All @@ -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'
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/launchdarkly/client/EventProcessor.java
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,10 @@ public void flush() {
}

private void postEvents(List<Event> 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");
Expand Down
4 changes: 4 additions & 0 deletions src/main/java/com/launchdarkly/client/StreamProcessor.java
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ public Future<Void> 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();
Expand Down