Logger settings are ignored

I can’t configure mediasoup client logger. No matter what I do it still logs it to browser console.
I used debug.disable(), I set localStorage.setItem(‘debug’, ‘-mediasoup*’)
I tried this and I tried that, nothing seems to work.

Basically I just would like to make the console less noise, to remove things like:

mediasoup-client:Device constructor() +0ms
19:46:37.830 mediasoup-client:Device constructor() | detected handler: Chrome74 +2ms
19:46:37.831 mediasoup-client:Chrome74 close() +0ms

Funny thing is that if I create my own logger (with debug module) it is configured just fine.

Any ideas what could be the problem?

I build the app using browserify if it matter.


Try doing “localStorage.setItem(‘debug’, ‘*’)” to show everything. I don’t think that rule you mentioned works. Something like ‘mediasoup-client:*’ would instead.

Remove ‘-’ from ‘-mediasoup*’

He wants to remove mediasoup-client logs so - is ok. Problem is that he is trying to use the debug api ( debug.disable()) which means that he is also importing debug in his app, but it could be a version different than the one used by mediasoup-client so it’s not the same debug object.

@skavish try writing into localStorage with your desired debug namespace value and then refresh the page.

I tried that as well. I just set to localStorage directly now, but it seems to be ignored.



I am going to debug it and see what is going on.

You must reload anyway. Reload the page and see its current debug value in localStorage.

I am an idiot, there was another place in the app where it was set before everything else.
Sorry guys :frowning:

nice :slight_smile: