sdk-java icon indicating copy to clipboard operation
sdk-java copied to clipboard

"Defaulting to non-proxy environment" log warning

Open worpet opened this issue 5 years ago • 4 comments

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:

https://github.com/AuthorizeNet/sdk-java/blob/487462da57ab1c1285ad345aefcca577360de55b/src/main/java/net/authorize/util/HttpClient.java#L134-L165

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.

worpet avatar Jul 09 '20 15:07 worpet

I'd take this a step further and say this should be a DEBUG statement.

johnstrickler avatar Aug 12 '20 16:08 johnstrickler

Agreed. Raising the log level to hide spam and mask real issues is not a solution. And this is literally a ONE line fix. Why has this not been addressed yet?

BlackPenguins avatar Feb 19 '21 17:02 BlackPenguins

I agree should be DEBUG, or at the very least INFO, certainly not a WARN.

This would be a useful fix, @gnongsie any intention to move forward with it?

subnetmarco avatar Sep 30 '23 23:09 subnetmarco

In the meantime the following configuration will skip the WARN spam and only capture ERROR and above:

logging.level.net.authorize.util.HttpClient=ERROR

subnetmarco avatar Sep 30 '23 23:09 subnetmarco