Skip to content

feat( react-sdk/vue-sdk): logger precedence browser dependents#542

Merged
roncohen merged 7 commits intomainfrom
feat/logger-precedence-browser-dependents
Mar 4, 2026
Merged

feat( react-sdk/vue-sdk): logger precedence browser dependents#542
roncohen merged 7 commits intomainfrom
feat/logger-precedence-browser-dependents

Conversation

@roncohen
Copy link
Contributor

@roncohen roncohen commented Mar 4, 2026

No description provided.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds support for passing a custom logger into the React and Vue SDK providers, and ensures the custom logger takes precedence over debug mode (which otherwise uses console).

Changes:

  • Add a logger prop to React/Vue providers and thread it into client initialization with precedence over debug.
  • Update internal useReflagClient helpers to accept { debug, logger } in the init options object and apply the precedence rule.
  • Add/adjust tests and README docs to cover/describe the new behavior.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.

Show a summary per file
File Description
packages/vue-sdk/test/usage.test.ts Adds Vue tests asserting logger is used and overrides debug.
packages/vue-sdk/src/types.ts Introduces logger?: Logger to provider props and omits logger from init-options passthrough types.
packages/vue-sdk/src/hooks.ts Updates useReflagClient to accept debug/logger in options and apply logger ?? (debug ? console : undefined).
packages/vue-sdk/src/ReflagProvider.vue Passes debug and logger into useReflagClient.
packages/vue-sdk/src/ReflagBootstrappedProvider.vue Passes debug and logger into useReflagClient for bootstrapped usage.
packages/vue-sdk/README.md Documents logger prop and precedence over debug.
packages/react-sdk/test/usage.test.tsx Adds React tests asserting logger is used and overrides debug.
packages/react-sdk/src/index.tsx Adds logger prop typing + threads logger into client creation with precedence over debug.
packages/react-sdk/README.md Documents logger prop and precedence over debug.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@roncohen roncohen changed the title feat(browser-sdk/react-sdk/vue-sdk): logger precedence browser dependents feat( react-sdk/vue-sdk): logger precedence browser dependents Mar 4, 2026
@roncohen roncohen added this pull request to the merge queue Mar 4, 2026
Merged via the queue into main with commit 76439a3 Mar 4, 2026
7 checks passed
@roncohen roncohen deleted the feat/logger-precedence-browser-dependents branch March 4, 2026 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants