optimizely / optimizely/go-sdk

[ENHANCEMENT] Add WithLogger option to support per-client logging configuration

Open
#398 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.