mediasoup

/ home / Documentation / mediasoup-client / Debugging

Debugging

Log levels

mediasoup-client uses the debug module to log to the browser console.

There are three log severities:

All the logs generated by mediasoup-client have a namespace starting with “mediasoup-client” plus colon, followed by the log severity plus colon (just if WARN or ERROR), and followed by the internal component name (if any) and the log message.

Enable logging

By default logging is turned off. In order to enable it, the debug key in the browser's localStorage must be set.

Check the debug module documentation for further information regarding how to filter specific log messages based on namespace matching rules.

Example

Within the <head> section of your HTML app:

<script>
  window.localStorage.setItem('debug', 'mediasoup-client:WARN* mediasoup-client:ERROR*');
</script>

<script src='/js/your-bundled-app.js'></script>