mediasoup-client uses the debug module to log to the browser console.
There are three log severities:
console.info
console.warn
console.error
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.
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:
<script>
window.localStorage.setItem('debug', 'mediasoup-client:WARN* mediasoup-client:ERROR*');
</script>
<script src='/js/your-bundled-app.js'></script>