Log only on debug log level in OpenSslEngine

Motivation:

At the moment we log priming read and handshake errors via info log level and still throw a SSLException that contains the error. We should only log with debug level to generate less noise.

Modifications:

Change logging to debug level.

Result:

Less noise .
This commit is contained in:
Norman Maurer 2015-02-05 21:02:56 +01:00
parent 8ea993d1ac
commit 1c01dd1efc

View File

@ -575,8 +575,8 @@ public final class OpenSslEngine extends SSLEngine {
long error = SSL.getLastErrorNumber(); long error = SSL.getLastErrorNumber();
if (OpenSsl.isError(error)) { if (OpenSsl.isError(error)) {
String err = SSL.getErrorString(error); String err = SSL.getErrorString(error);
if (logger.isInfoEnabled()) { if (logger.isDebugEnabled()) {
logger.info( logger.debug(
"SSL_read failed: primingReadResult: " + lastPrimingReadResult + "SSL_read failed: primingReadResult: " + lastPrimingReadResult +
"; OpenSSL error: '" + err + '\''); "; OpenSSL error: '" + err + '\'');
} }
@ -1167,8 +1167,8 @@ public final class OpenSslEngine extends SSLEngine {
long error = SSL.getLastErrorNumber(); long error = SSL.getLastErrorNumber();
if (OpenSsl.isError(error)) { if (OpenSsl.isError(error)) {
String err = SSL.getErrorString(error); String err = SSL.getErrorString(error);
if (logger.isInfoEnabled()) { if (logger.isDebugEnabled()) {
logger.info( logger.debug(
"SSL_do_handshake failed: OpenSSL error: '" + err + '\''); "SSL_do_handshake failed: OpenSSL error: '" + err + '\'');
} }