Closed
Description
Is there an existing issue for this?
- I have searched the existing issues
SDK Version
3.1.1
Current Behavior
Setting log level to Error
, don't reduce amount of warnings and info logs in console
Expected Behavior
If log level == Error
no info or warning logs appear in console.
Steps To Reproduce
- Changing log level to Error, the way described in the documentation not changing console output
- Passing log level as part of config to
createInstance
also not working
React Framework
No response
Browsers impacted
No response
Link
- https://github.com/optimizely/react-sdk/blob/master/src/logger.tsx#L19 Here we create logger instance and pass only prefix.
- https://github.com/optimizely/javascript-sdk/blob/4909efb74335b754592ddf6e8415047fc0bf3e7b/lib/modules/logging/logger.ts#L99
If I am not mistaken this is the logger we creating, without any arguments beside the prefix. Line 20 in d43cabd
Here we import created logger, and use it.- The logger instance created for React SDK is not exported, so changing log level on created instance also not possible.
Logs
No response
Severity
No response
Workaround/Solution
No response
Recent Change
No response
Conflicts
No response