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
feat: Added optional args to logger.log to format string only when log level applies (#706)
## Summary
Message formatting is performance heavy. The logger takes formatted message as a parameter, which means message formatting is being done for all types of logs even in cases when the log level does not apply. This PR adds arguments array to the `log` function to carry token values. Logger already has the functionality to `sprintf` based on extra args if the log level applies. This will increase performance in cases where log level is restricted to more conservative ones such as `ERROR`.
## Test plan
- All Unit tests pass
- Manually tested thoroughly with optimizely-sdk package. A follow up PR for the main package will be created after this is merged and released.
0 commit comments