Skip to content

Commit

Permalink
[fix][misc] Log Conscrypt security provider initialization warnings a…
Browse files Browse the repository at this point in the history
…t debug level (apache#23364)

(cherry picked from commit 950309b)
(cherry picked from commit 988b884)
  • Loading branch information
lhotari authored and nikhil-ctds committed Oct 15, 2024
1 parent 7eda5b8 commit be78b9d
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -125,12 +125,12 @@ private static Provider loadConscryptProvider() {
conscryptClazz.getMethod("checkAvailability").invoke(null);
} catch (Throwable e) {
if (e instanceof ClassNotFoundException) {
log.warn("Conscrypt isn't available in the classpath. Using JDK default security provider.");
log.debug("Conscrypt isn't available in the classpath. Using JDK default security provider.");
} else if (e.getCause() instanceof UnsatisfiedLinkError) {
log.warn("Conscrypt isn't available for {} {}. Using JDK default security provider.",
log.debug("Conscrypt isn't available for {} {}. Using JDK default security provider.",
System.getProperty("os.name"), System.getProperty("os.arch"));
} else {
log.warn("Conscrypt isn't available. Using JDK default security provider."
log.debug("Conscrypt isn't available. Using JDK default security provider."
+ " Cause : {}, Reason : {}", e.getCause(), e.getMessage());
}
return null;
Expand All @@ -140,7 +140,7 @@ private static Provider loadConscryptProvider() {
try {
provider = (Provider) Class.forName(CONSCRYPT_PROVIDER_CLASS).getDeclaredConstructor().newInstance();
} catch (ReflectiveOperationException e) {
log.warn("Unable to get security provider for class {}", CONSCRYPT_PROVIDER_CLASS, e);
log.debug("Unable to get security provider for class {}", CONSCRYPT_PROVIDER_CLASS, e);
return null;
}

Expand Down

0 comments on commit be78b9d

Please sign in to comment.