diff --git a/README.md b/README.md
index 87c7723c..50e9971b 100644
--- a/README.md
+++ b/README.md
@@ -26,11 +26,11 @@ All in all, you should do the following:
* pick your favorite logging implementation, and
* adjust your logging configuration accordingly.
-Say, you want to make use of the *servlet filter* feature, then you need to add the following dependency to your POM with property `cf-logging-version` referring to the latest version (currently `2.0.10`):
+Say, you want to make use of the *servlet filter* feature, then you need to add the following dependency to your POM with property `cf-logging-version` referring to the latest version (currently `2.0.11`):
```xml
- 2.0.10
+ 2.0.11
```
diff --git a/cf-java-logging-support-core/pom.xml b/cf-java-logging-support-core/pom.xml
index e15de71c..a975ee71 100644
--- a/cf-java-logging-support-core/pom.xml
+++ b/cf-java-logging-support-core/pom.xml
@@ -24,7 +24,7 @@
com.sap.hcp.cf.logging
cf-java-logging-support-parent
- 2.0.10
+ 2.0.11
../pom.xml
diff --git a/cf-java-logging-support-jersey/pom.xml b/cf-java-logging-support-jersey/pom.xml
index 7b3fdd53..9554cc63 100644
--- a/cf-java-logging-support-jersey/pom.xml
+++ b/cf-java-logging-support-jersey/pom.xml
@@ -9,7 +9,7 @@
../pom.xml
com.sap.hcp.cf.logging
cf-java-logging-support-parent
- 2.0.10
+ 2.0.11
cf-java-logging-support-jersey
diff --git a/cf-java-logging-support-log4j2/pom.xml b/cf-java-logging-support-log4j2/pom.xml
index 982b25ad..098b8483 100644
--- a/cf-java-logging-support-log4j2/pom.xml
+++ b/cf-java-logging-support-log4j2/pom.xml
@@ -11,7 +11,7 @@
../pom.xml
com.sap.hcp.cf.logging
cf-java-logging-support-parent
- 2.0.10
+ 2.0.11
diff --git a/cf-java-logging-support-logback/pom.xml b/cf-java-logging-support-logback/pom.xml
index 0420f2f4..eec0b133 100644
--- a/cf-java-logging-support-logback/pom.xml
+++ b/cf-java-logging-support-logback/pom.xml
@@ -10,7 +10,7 @@
../pom.xml
com.sap.hcp.cf.logging
cf-java-logging-support-parent
- 2.0.10
+ 2.0.11
diff --git a/cf-java-logging-support-servlet/pom.xml b/cf-java-logging-support-servlet/pom.xml
index 8b90de67..b8a08ffa 100644
--- a/cf-java-logging-support-servlet/pom.xml
+++ b/cf-java-logging-support-servlet/pom.xml
@@ -9,7 +9,7 @@
com.sap.hcp.cf.logging
cf-java-logging-support-parent
- 2.0.10
+ 2.0.11
../pom.xml
diff --git a/pom.xml b/pom.xml
index 3e26a75a..5a4232c9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
com.sap.hcp.cf.logging
cf-java-logging-support-parent
- 2.0.10
+ 2.0.11
pom
Cloud Foundry Java logging support components
diff --git a/sample/README.md b/sample/README.md
index d6a91d85..3655e450 100644
--- a/sample/README.md
+++ b/sample/README.md
@@ -6,6 +6,8 @@ A simple CF sample application that we cloned from [cloudfoundry-sticky-session]
Currently configured to use `log4j2` as the logging implementation.
+It uses a environment variable `RANDOM_SLEEP` which, when set to `true` will introduce a artificial delay (up to 1 sec).
+
## Running it locally
You can use the following Maven target to run the application locally
diff --git a/sample/manifest.yml b/sample/manifest.yml
index 80f51b73..ae693661 100755
--- a/sample/manifest.yml
+++ b/sample/manifest.yml
@@ -7,4 +7,6 @@ applications:
host: logging-sample-app
instances: 1
memory: 256M
- path: target/logging-sample-app-2.0.10.war
+ path: target/logging-sample-app-2.0.11.war
+ env:
+ RANDOM_SLEEP: true
diff --git a/sample/pom.xml b/sample/pom.xml
index 64e701b5..53e5b2cb 100644
--- a/sample/pom.xml
+++ b/sample/pom.xml
@@ -6,7 +6,7 @@
com.sap.hcp.cf.logging
cf-java-logging-support-parent
- 2.0.10
+ 2.0.11
../pom.xml
@@ -18,7 +18,7 @@
1.7.12
2.22.2
2.0.1
- 2.0.10
+ 2.0.11
diff --git a/sample/src/main/java/com/sap/hcp/cf/sample/PickGreeting.java b/sample/src/main/java/com/sap/hcp/cf/sample/PickGreeting.java
index 8a5bf874..ca657e89 100644
--- a/sample/src/main/java/com/sap/hcp/cf/sample/PickGreeting.java
+++ b/sample/src/main/java/com/sap/hcp/cf/sample/PickGreeting.java
@@ -1,13 +1,14 @@
- package com.sap.hcp.cf.sample;
+package com.sap.hcp.cf.sample;
- import java.util.Random;
+import java.util.Random;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class PickGreeting {
private static Random random = new Random();
-
+ private static boolean DO_SLEEP = Boolean.getBoolean("RANDOM_SLEEP");
+
private static final String[] GREETINGS = new String[] {
"Hello Stranger",
"Bonjour!",
@@ -16,15 +17,16 @@ public class PickGreeting {
"What a beautiful day!",
"\u0c90 \u0ca0"
};
-
+
private static final Logger LOGGER = LoggerFactory.getLogger(PickGreeting.class);
-
+
public static String pick() {
- try {
- Thread.sleep(random.nextInt(1000));
- }
- catch (Exception ex) {
- LOGGER.error("Thread.sleep() failed", ex);
+ if (DO_SLEEP) {
+ try {
+ Thread.sleep(random.nextInt(1000));
+ } catch (Exception ex) {
+ LOGGER.error("Thread.sleep() failed", ex);
+ }
}
String greeting = GREETINGS[random.nextInt(GREETINGS.length)];
LOGGER.info("Picked greeting : {}", greeting);