configcat / java-sdk

ConfigCat SDK for Java. ConfigCat is a hosted feature flag service: https://configcat.com. Manage feature toggles across frontend, backend, mobile, desktop apps. Alternative to LaunchDarkly. Management app + feature flag SDKs.
https://configcat.com/docs/sdk-reference/java
MIT License
20 stars 6 forks source link

Spurious "onReposnse" error logged every refresh #22

Closed tobinus closed 1 year ago

tobinus commented 1 year ago

Describe the bug

Every time ConfigCat (we're using version 8.0.0) retrieves the current values, it logs a log message like this:

{"message":"onReposnse","logger_name":"com.configcat.ConfigCatClient","thread_name":"OkHttp https://cdn-eu.configcat.com/...","level":"ERROR","level_value":40000}

This is a very unspecific error, and it seems like the value updates are still succeeding. It pollutes our logs.

Thanks to the misspelling of "onResponse", I was able to locate the source of this spurious log message: https://github.com/configcat/java-sdk/blob/400b4877d4593d298db95358f2031111b7106149/src/main/java/com/configcat/ConfigFetcher.java#L117 It seems like the log message was added to aid in debugging, but was not removed before release.

To reproduce

Use the ConfigCat SDK and observe the logs when it retrieves values from ConfigCat.

Expected behavior

If there is an actual error, it should be much more detailed. If there is no error, then it shouldn't log a message with the error level.

novalisdenahi commented 1 year ago

Hi @tobinus,

Thanks for noticing the problem! Sorry about it. We try to make our SDKs as user friendly and as convenient as possible. We removed the unnecessary error log from the code and released the new version. You can find the v8.0.1 version here.

Best Regards, Daniel

tobinus commented 1 year ago

Thank you for the swift release! The issue seems to have been fixed 🙂