mediasoup

/ home / Documentation / v3 / mediasoup-client / Debugging

mediasoup-client v3 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 in upper case 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>