Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[fix][misc] Log Conscrypt security provider initialization warnings at debug level #23364

Merged
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -133,12 +133,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 @@ -148,7 +148,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
Loading