Skip to content

Commit 792d0c2

Browse files
authored
DRILL-7764: Cleanup warning messages in GuavaPatcher class (#2093)
* DRILL-7764: Cleanup warning messages in GuavaPatcher class
1 parent 46dabbd commit 792d0c2

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

common/src/main/java/org/apache/drill/common/util/GuavaPatcher.java

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,15 @@ private static void patchStopwatch() {
7373

7474
logger.info("Google's Stopwatch patched for old HBase Guava version.");
7575
} catch (Exception e) {
76-
logger.warn("Unable to patch Guava classes.", e);
76+
logUnableToPatchException(e);
7777
}
7878
}
7979

80+
private static void logUnableToPatchException(Exception e) {
81+
logger.warn("Unable to patch Guava classes: {}", e.getMessage());
82+
logger.debug("Exception:", e);
83+
}
84+
8085
private static void patchCloseables() {
8186
try {
8287
ClassPool cp = getClassPool();
@@ -93,7 +98,7 @@ private static void patchCloseables() {
9398

9499
logger.info("Google's Closeables patched for old HBase Guava version.");
95100
} catch (Exception e) {
96-
logger.warn("Unable to patch Guava classes.", e);
101+
logUnableToPatchException(e);
97102
}
98103
}
99104

@@ -191,7 +196,7 @@ private static void patchPreconditions() {
191196
cc.toClass();
192197
logger.info("Google's Preconditions were patched to hold new methods.");
193198
} catch (Exception e) {
194-
logger.warn("Unable to patch Guava classes.", e);
199+
logUnableToPatchException(e);
195200
}
196201
}
197202

0 commit comments

Comments
 (0)