Skip to content

Commit 022f49e

Browse files
committed
Updated util and pom
1 parent d07f276 commit 022f49e

File tree

2 files changed

+27
-31
lines changed

2 files changed

+27
-31
lines changed

pom.xml

Lines changed: 23 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -43,36 +43,13 @@
4343
</properties>
4444

4545
<dependencies>
46-
<dependency>
47-
<groupId>org.openjdk.jmh</groupId>
48-
<artifactId>jmh-core</artifactId>
49-
<version>${jmh.version}</version>
50-
</dependency>
51-
<dependency>
52-
<groupId>org.openjdk.jmh</groupId>
53-
<artifactId>jmh-generator-annprocess</artifactId>
54-
<version>${jmh.version}</version>
55-
</dependency>
46+
<!-- jedis client dependency [REQUIRED] -->
5647
<dependency>
5748
<groupId>redis.clients</groupId>
5849
<artifactId>jedis</artifactId>
5950
<version>${jedis.version}</version>
6051
</dependency>
61-
<dependency>
62-
<groupId>org.apache.commons</groupId>
63-
<artifactId>commons-pool2</artifactId>
64-
<version>2.11.1</version>
65-
</dependency>
66-
<dependency>
67-
<groupId>commons-io</groupId>
68-
<artifactId>commons-io</artifactId>
69-
<version>2.11.0</version>
70-
</dependency>
71-
<dependency>
72-
<groupId>org.slf4j</groupId>
73-
<artifactId>slf4j-simple</artifactId>
74-
<version>${slf4j.version}</version>
75-
</dependency>
52+
<!-- resilience4j dependencies [REQUIRED for cross-cluster-failover feature] -->
7653
<dependency>
7754
<groupId>io.github.resilience4j</groupId>
7855
<artifactId>resilience4j-all</artifactId>
@@ -97,6 +74,27 @@
9774
<version>${resilience4j.version}</version>
9875
<optional>true</optional>
9976
</dependency>
77+
<!-- jmh and other dependencies [REQUIRED for benchmark, email alerts and logging features] -->
78+
<dependency>
79+
<groupId>org.openjdk.jmh</groupId>
80+
<artifactId>jmh-core</artifactId>
81+
<version>${jmh.version}</version>
82+
</dependency>
83+
<dependency>
84+
<groupId>org.openjdk.jmh</groupId>
85+
<artifactId>jmh-generator-annprocess</artifactId>
86+
<version>${jmh.version}</version>
87+
</dependency>
88+
<dependency>
89+
<groupId>commons-io</groupId>
90+
<artifactId>commons-io</artifactId>
91+
<version>2.11.0</version>
92+
</dependency>
93+
<dependency>
94+
<groupId>org.slf4j</groupId>
95+
<artifactId>slf4j-simple</artifactId>
96+
<version>${slf4j.version}</version>
97+
</dependency>
10098
<dependency>
10199
<groupId>org.apache.commons</groupId>
102100
<artifactId>commons-email</artifactId>

src/main/java/com/redis/benchmark/utils/EmailAlertUtils.java

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
package com.redis.benchmark.utils;
22

3+
import java.util.HashMap;
4+
import java.util.StringTokenizer;
5+
import java.util.function.Consumer;
36
import org.apache.commons.mail.DefaultAuthenticator;
47
import org.apache.commons.mail.ImageHtmlEmail;
58
import org.slf4j.Logger;
69
import org.slf4j.LoggerFactory;
710

8-
import java.util.HashMap;
9-
import java.util.StringTokenizer;
10-
import java.util.function.Consumer;
11-
12-
1311
public final class EmailAlertUtils implements Consumer<String> {
1412
private static final Logger LOGGER = LoggerFactory.getLogger(EmailAlertUtils.class);
1513
private static final String WHOAMI = "EmailAlert";
@@ -45,7 +43,7 @@ public void sendHtmlEmail(String to, String subject, String text, String priorit
4543
LOGGER.debug("Sent an email alert to {}", to);
4644

4745
} catch (Exception e) {
48-
LOGGER.error("Failed during {} {}", WHOAMI, e);
46+
LOGGER.error("Failed during {} {}", WHOAMI, e.getMessage());
4947
}
5048
}
5149

0 commit comments

Comments
 (0)