-
Notifications
You must be signed in to change notification settings - Fork 13k
chore: enable media calls client logger #37079
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
Conversation
|
Looks like this PR is ready to merge! 🎉 |
|
WalkthroughAdds a new MediaCallLogger class implementing IMediaSignalLogger for conditional console logging based on URL debug flags, and wires it into MediaSignalingSession by passing a new MediaCallLogger instance during session creation in useMediaSessionInstance. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant UI as UI/Caller
participant Store as MediaSessionStore.makeInstance
participant Session as MediaSignalingSession
participant Logger as MediaCallLogger
participant Console as Console
UI->>Store: create session
Store->>Logger: new MediaCallLogger()
Store->>Session: new MediaSignalingSession({ logger: Logger })
note right of Session: Session uses provided logger
alt debug flag present (debug|debug-voip)
Session->>Logger: log/debug(...)
Logger->>Console: console.log/debug(...)
else no debug flag
Session->>Logger: log/debug(...)
Logger--xConsole: no output
end
Session->>Logger: warn/error(...)
Logger->>Console: console.warn/error(...)
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Jira integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (2)
packages/ui-voip/src/v2/MediaCallLogger.ts(1 hunks)packages/ui-voip/src/v2/useMediaSessionInstance.ts(2 hunks)
🧰 Additional context used
🧬 Code graph analysis (2)
packages/ui-voip/src/v2/useMediaSessionInstance.ts (1)
packages/ui-voip/src/v2/MediaCallLogger.ts (1)
MediaCallLogger(3-26)
packages/ui-voip/src/v2/MediaCallLogger.ts (1)
packages/media-signaling/src/definition/logger.ts (1)
IMediaSignalLogger(1-6)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
- GitHub Check: 📦 Build Packages
- GitHub Check: CodeQL-Build
- GitHub Check: CodeQL-Build
🔇 Additional comments (1)
packages/ui-voip/src/v2/useMediaSessionInstance.ts (1)
8-117: Logger wiring looks goodPassing the new
MediaCallLoggerinto the session ensures the signaling stack can honor the debug flag without touching the rest of the flow. Looks solid.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #37079 +/- ##
===========================================
+ Coverage 66.28% 67.41% +1.12%
===========================================
Files 3094 3328 +234
Lines 109753 113342 +3589
Branches 19721 20561 +840
===========================================
+ Hits 72753 76410 +3657
+ Misses 34668 34337 -331
- Partials 2332 2595 +263
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
Proposed changes (including videos or screenshots)
Issue(s)
Steps to test or reproduce
Further comments
Summary by CodeRabbit