improve logging for new httpclient options

This commit is contained in:
Sebastian Sdorra
2012-06-04 14:08:44 +02:00
parent ade02c31c5
commit 33a0fdf52f

View File

@@ -399,6 +399,11 @@ public class URLHttpClient implements HttpClient
{ {
if (request.isDisableCertificateValidation()) if (request.isDisableCertificateValidation())
{ {
if (logger.isTraceEnabled())
{
logger.trace("disable certificate validation");
}
try try
{ {
TrustManager[] trustAllCerts = new TrustManager[] { TrustManager[] trustAllCerts = new TrustManager[] {
@@ -416,6 +421,11 @@ public class URLHttpClient implements HttpClient
if (request.isDisableHostnameValidation()) if (request.isDisableHostnameValidation())
{ {
if (logger.isTraceEnabled())
{
logger.trace("disable hostname validation");
}
connection.setHostnameVerifier(new TrustAllHostnameVerifier()); connection.setHostnameVerifier(new TrustAllHostnameVerifier());
} }
} }
@@ -543,6 +553,11 @@ public class URLHttpClient implements HttpClient
} }
else else
{ {
if (request.isIgnoreProxySettings() && logger.isTraceEnabled())
{
logger.trace("ignore proxy settings");
}
if (logger.isDebugEnabled()) if (logger.isDebugEnabled())
{ {
logger.debug("fetch '{}'", url.toExternalForm()); logger.debug("fetch '{}'", url.toExternalForm());