/ home / Documentation / v2 / mediasoup-client / 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.


Within the <head> section of your HTML app:

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

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