-
Notifications
You must be signed in to change notification settings - Fork 1
FCE-2473 / add article on debug option #215
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
Merged
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
9fc4ae4
add debug logging article
czerwiukk 24d07cf
add docs about the debug option
czerwiukk 2521cca
add cut part
czerwiukk 734bf1e
remove whiteline
czerwiukk 205ff65
add react
czerwiukk df0c15f
add missing vars
czerwiukk 8150372
remove stale versoins
czerwiukk 95d7e40
bump submodules
czerwiukk fca7548
Update docs/how-to/react/debug-logging.mdx
czerwiukk ca65bb6
remove
czerwiukk 387654e
fix stale type
czerwiukk 1250e38
fix from Tomek
czerwiukk e4a87e6
bump docs
czerwiukk File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
Submodule fishjam-server
updated
from 391609 to 65b3b4
Submodule room-manager
updated
from d3a605 to ac1122
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,66 @@ | ||
| --- | ||
| sidebar_position: 9 | ||
| --- | ||
|
|
||
| # Debug logging | ||
|
|
||
| The Fishjam SDK includes a built-in debugging mode to help developers troubleshoot connectivity and media issues during development. This feature controls the verbosity of the SDK's internal logging mechanisms. | ||
|
|
||
| ## Overview | ||
|
|
||
| By default, the SDK suppresses internal logs to keep your browser console clean in production environments. Enabling `debug` mode allows the SDK to output warnings and errors to the console, prefixed with `[FISHJAM]`. | ||
|
|
||
| ## Usage | ||
|
|
||
| To enable debugging in a React application, pass the `debug` prop to the `FishjamProvider`. | ||
|
|
||
| ```tsx | ||
| import React from "react"; | ||
| const App = () => null; | ||
| // ---cut--- | ||
| import { FishjamProvider } from "@fishjam-cloud/react-client"; | ||
|
|
||
| function Root() { | ||
| return ( | ||
| <FishjamProvider | ||
| fishjamId="your-fishjam-id" | ||
| debug // Enable debug logs | ||
| > | ||
| <App /> | ||
| </FishjamProvider> | ||
| ); | ||
| } | ||
| ``` | ||
|
|
||
| We recommend toggling this based on your environment variables: | ||
|
|
||
| ```tsx | ||
| import React from "react"; | ||
| import { FishjamProvider } from "@fishjam-cloud/react-client"; | ||
| const process = { | ||
| env: { NODE_ENV: "development", FISHJAM_ID: "your-fishjam-id" }, | ||
| }; | ||
| const App = () => null; | ||
| // ---cut--- | ||
| <FishjamProvider | ||
| fishjamId={process.env.FISHJAM_ID} | ||
| debug={process.env.NODE_ENV === "development"} | ||
| > | ||
| <App /> | ||
| </FishjamProvider>; | ||
| ``` | ||
|
|
||
| ## Behavior | ||
|
|
||
| - **Enabled (`true`):** The SDK will log internal warnings (e.g., permission errors, socket closures, signaling issues) and errors to the browser console. All logs are prefixed with `[FISHJAM]` for easy filtering. | ||
| - **Disabled (`false` or `undefined`):** The SDK operates silently, suppressing internal `console.warn` and `console.error` calls to prevent console pollution. | ||
|
|
||
| ### Example Output | ||
|
|
||
| When enabled, you may see logs similar to: | ||
|
|
||
| ```text | ||
| [FISHJAM] Socket closed with reason: ... | ||
| [FISHJAM] Couldn't get camera permission: NotAllowedError ... | ||
| [FISHJAM] ICE connection: disconnected | ||
| ``` | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule js-server-sdk
updated
28 files
Submodule mobile-client-sdk
updated
2 files
| +1 −1 | package.json | |
| +1 −1 | packages/react-native-client/package.json |
Submodule python-server-sdk
updated
25 files
Submodule web-client-sdk
updated
42 files
This file was deleted.
Oops, something went wrong.
31 changes: 0 additions & 31 deletions
31
versioned_docs/version-0.20.0/api/mobile/functions/FishjamRoom.md
This file was deleted.
Oops, something went wrong.
17 changes: 0 additions & 17 deletions
17
versioned_docs/version-0.20.0/api/mobile/functions/LivestreamStreamer.md
This file was deleted.
Oops, something went wrong.
17 changes: 0 additions & 17 deletions
17
versioned_docs/version-0.20.0/api/mobile/functions/LivestreamViewer.md
This file was deleted.
Oops, something went wrong.
66 changes: 0 additions & 66 deletions
66
versioned_docs/version-0.20.0/api/mobile/functions/useAudioSettings.md
This file was deleted.
Oops, something went wrong.
17 changes: 0 additions & 17 deletions
17
versioned_docs/version-0.20.0/api/mobile/functions/useBandwidthEstimation.md
This file was deleted.
Oops, something went wrong.
90 changes: 0 additions & 90 deletions
90
versioned_docs/version-0.20.0/api/mobile/functions/useCamera.md
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.