I have the follow situation:
var options = {
protocols_whitelist : [ "websocket", "xhr-streaming", "xdr-streaming", "xhr-polling", "xdr-polling", "iframe-htmlfile", "iframe-eventsource", "iframe-xhr-polling" ],
debug : false
};
var socket = new SockJS("/mmyurl/",undefined,options);
var stompClient = Stomp.over(socket);
stompClient.connect({
company : "XXXXX"
}, function(frame) {
stompClient.subscribe('/topic/mytopic', function(message){
var myitem = JSON.parse(message.body);
});
all works fine, the problem is that on the javascript console is full of debug messages like this:
<<< MESSAGE
content-type:application/json;charset=UTF-8
subscription:sub-1
message-id:o6g660dt-113
destination:/topic/mytopic
content-length:411
And I want to disable the messages.
I tried to change some option and also tried to register simply:
var socket = new SockJS("/mmyurl/");
but it doesn't work.
Is there a way to disable the debug messages?
Any help is appreciated
Ok I found a solution.
I added this code:
stompClient.debug = null
In this way, the debug function is disabled.
I tried JR's answer but started receiving errors (was using redux sagas) - changing debug to an empty function worked ...
stompClient.debug = () => {};
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With