You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was just in the process of creating a bug for this exact scenario. Luckily saw this one first!
It's frustrating that, as a consumer, I cannot change the log level of the react-sdk internal logger as it is causing a lot of unnecessary log noise for my services in certain scenarios.
I was poking around and it seems like the easiest solution is to export the instance of logger in src/logger.tsx called logHandler. Once it is exported, we can access it at a constructor of OptimizelyReactSDKClient in src/client.ts and set a proper log level based on the config there. I tested it locally and it works like a charm. Unfortunately I can't create a PR at this time, so if anybody has a capacity...
This definitely requires some attention. There are some inconsistencies that I can confirm. I have created an internal ticket FSSDK-10554 for further investigation.
Is there an existing issue for this?
SDK Version
3.1.1
Current Behavior
Setting log level to
Error
, don't reduce amount of warnings and info logs in consoleExpected Behavior
If log
level == Error
no info or warning logs appear in console.Steps To Reproduce
createInstance
also not workingReact Framework
No response
Browsers impacted
No response
Link
If I am not mistaken this is the logger we creating, without any arguments beside the prefix.
react-sdk/src/client.ts
Line 20 in d43cabd
Here we import created logger, and use it.
Logs
No response
Severity
No response
Workaround/Solution
No response
Recent Change
No response
Conflicts
No response
The text was updated successfully, but these errors were encountered: