Logs are crucial for debugging purposes. See how easily retrieve them while dealing with an application made with the Web SDK.
First, you have to enable logging. To do so, specify the showDebugInfo parameter while initiating an SDK instance:
Logs in Developer Console
While using a Web SDK app in a browser, open the developer console and click the Levels dropdown to check Verbose.
- In Chrome, press F12 or
Ctrl+Shift+J(Windows, Linux, Chrome OS).
- In Firefox, select "Web Console" from the Web Developer submenu in the Firefox menu (or Tools menu if you display the menu bar or are on Mac) or press
Ctrl+Shift+I(Windows) or press
- In Safari, enable the Develop menu in Advanced preferences: Safari > Preferences > Advanced > Show Develop menu, then choose Develop > Show Error Console.
Now, reproduce your issue, right-click on the console panel, and choose "Save as…" to save the output to a file.
Don't forget to send the result file to our Support team if needed.
Logs in Browser
To see logs in the browser main window, use either Chrome or Firefox browser. Depending on which one of them you use, open "chrome://webrtc-internals/" or "about:webrtc" URL respectively.
Next, open the Web application being debugged in a new tab and reproduce the problem.
Finally, go back to the logs tab and save them as Web Page, Complete.
To learn some features on how it works in Google Chrome, see the appropriate article.
For those who want to organize logs in a special way (e.g., collect them in a database for further analysis), we've got a demo called log-collector, that is available freely on Github.
The demo allows you to collect logs about calls state and send it to your backend server. What backend server to choose is up to you, the demo works fine with all of them since it sends POST requests and use no black magic.