Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(logging): add better dev mode checking so this works in RN #1099

Merged
merged 1 commit into from
Oct 23, 2024

Conversation

moldy530
Copy link
Collaborator

@moldy530 moldy530 commented Oct 22, 2024

Pull Request Checklist


PR-Codex overview

This PR focuses on improving the determination of the development mode in the logging utility by introducing a new function, isClientDevMode, and refactoring the client logger's initialization to handle errors more gracefully.

Detailed summary

  • Added isClientDevMode function in utils.ts to check if the client is in development mode.
  • Refactored createClientLogger in client.ts to use isClientDevMode instead of directly checking window.location.
  • Updated createLogger in index.ts to handle errors during logger initialization and return noopLogger if an error occurs.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

Copy link

vercel bot commented Oct 22, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
aa-sdk-site ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 22, 2024 5:40pm
aa-sdk-ui-demo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 22, 2024 5:40pm

@moldy530 moldy530 merged commit 5a15482 into main Oct 23, 2024
6 checks passed
@moldy530 moldy530 deleted the moldy/fix-rn-logger-build branch October 23, 2024 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants