We frequently see lines with this message in our logs:
WARN Defaulting to non-proxy environment
We have traced the source of these to the below Authorize.net code:
|
if (UseProxy && ProxyHost != null) { |
|
|
|
HttpClientBuilder hcBuilder; |
|
if (proxyUsername != null && proxyPassword != null) { |
|
LogHelper.info(logger, "Setting up proxy to URL with Authentication: '%s://%s@%s:%d'", |
|
Constants.PROXY_PROTOCOL, proxyUsername, ProxyHost, ProxyPort); |
|
CredentialsProvider credsProvider = new BasicCredentialsProvider(); |
|
AuthScope proxyScope = new AuthScope(ProxyHost, ProxyPort); |
|
Credentials proxyCreds = new UsernamePasswordCredentials(proxyUsername, proxyPassword); |
|
credsProvider.setCredentials(proxyScope, proxyCreds); |
|
hcBuilder = HttpClients.custom().setSSLSocketFactory(sslSocketFactory) |
|
.setDefaultRequestConfig(requestConfig).setRedirectStrategy(new LaxRedirectStrategy()) |
|
.setDefaultCredentialsProvider(credsProvider); |
|
} else { |
|
LogHelper.info(logger, "Setting up proxy to URL: '%s://%s:%d'", Constants.PROXY_PROTOCOL, ProxyHost, |
|
ProxyPort); |
|
hcBuilder = HttpClients.custom().setSSLSocketFactory(sslSocketFactory) |
|
.setDefaultRequestConfig(requestConfig).setRedirectStrategy(new LaxRedirectStrategy()); |
|
} |
|
|
|
HttpHost httpProxy = new HttpHost(ProxyHost, ProxyPort, Constants.PROXY_PROTOCOL); |
|
hcBuilder.setProxy(httpProxy); |
|
|
|
httpClient = hcBuilder.build(); |
|
|
|
proxySet = true; |
|
} else { |
|
LogHelper.warn(logger, "Defaulting to non-proxy environment"); |
|
|
|
httpClient = HttpClients.custom().setSSLSocketFactory(sslSocketFactory) |
|
.setDefaultRequestConfig(requestConfig).setRedirectStrategy(new LaxRedirectStrategy()).build(); |
|
} |
It seems like this should be an INFO rather than a WARN. We want to keep our log threshold at WARN to be able to see potential problems, but then we end up with mostly these "non-proxy environment" lines.
Found others complaining here: https://community.developer.authorize.net/t5/Integration-and-Testing/quot-Non-proxy-quot-from-AuthNet-SDK-is-spamming-our-logs/td-p/71855.
We frequently see lines with this message in our logs:
We have traced the source of these to the below Authorize.net code:
sdk-java/src/main/java/net/authorize/util/HttpClient.java
Lines 134 to 165 in 487462d
It seems like this should be an INFO rather than a WARN. We want to keep our log threshold at WARN to be able to see potential problems, but then we end up with mostly these "non-proxy environment" lines.
Found others complaining here: https://community.developer.authorize.net/t5/Integration-and-Testing/quot-Non-proxy-quot-from-AuthNet-SDK-is-spamming-our-logs/td-p/71855.