how to disable console log

137 views
Skip to first unread message

quyen luu

unread,
May 21, 2016, 8:37:23 AM5/21/16
to kurento
Hi everyone, i am newbie and i learn about kurento from example. Now, i want to disable console log, please help me..

chris....@gmail.com

unread,
May 23, 2016, 6:39:32 PM5/23/16
to kurento
If you want to disable kurento-utils.js's log (and all other logging) you can simply override the global window console like so:

var console = (function (oldConsole) {
 
return {
 log
: function (msg) {},
 info
: function (msg) {},
 warn
: function (msg) {},
 error
: function (msg) {}
 
};
}(window.console));
window
.console = console;

Make sure that this code is after the inclusion of all other JS files. This should only be used in production as it could swallow logs that are otherwise helpful.

quyen luu

unread,
May 24, 2016, 11:15:24 PM5/24/16
to kurento, chris....@gmail.com
Yes, thank you so much...

Thang Hoang

unread,
Mar 21, 2017, 11:23:31 PM3/21/17
to kurento, chris....@gmail.com

How can I disable only Kurento's related log?


On Tuesday, May 24, 2016 at 5:39:32 AM UTC+7, chris....@gmail.com wrote:
Reply all
Reply to author
Forward
0 new messages