optimizely / optimizely/go-sdk
[ENHANCEMENT] Add WithLogger option to support per-client logging configuration
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 18
- Forks
- 16
- Avg merge
- 6d 4h
- Merged PRs (30d)
- 1
Description
Description
Currently, the SDK only supports a global logger configuration through SetLogger(), making it difficult to properly manage logs across multiple Optimizely clients in the same application.
I propose adding a WithLogger option function to the OptimizelyFactory similar to other option functions like WithEventDispatcher or WithUserProfileService.
Benefits
- Each client can have its own dedicated logger
Detail
No response
Examples
No response
Risks/Downsides
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating OptimizelyFactory and the existing SetLogger implementation, then compare the option patterns used by WithEventDispatcher and WithUserProfileService. Trace how factory options reach each client and identify the relevant tests or test entry points. Done means clients created with WithLogger use their own logger without changing global logging behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100