Change console log level

This commit is contained in:
kPherox 2019-04-22 03:33:56 +09:00
parent bd8d480e07
commit 4f3a7c47e3
No known key found for this signature in database
GPG Key ID: C04751C2BFA2F62D
2 changed files with 12 additions and 8 deletions

View File

@ -94,12 +94,14 @@ function mixre(acct_id, tlid, TLtype, mute,delc,voice,mode) {
websocketLocal[wslid] = new WebSocket(startLocal); websocketLocal[wslid] = new WebSocket(startLocal);
websocketHome[wshid].onopen = function(mess) { websocketHome[wshid].onopen = function(mess) {
localStorage.setItem("wssH_" + tlid, wshid); localStorage.setItem("wssH_" + tlid, wshid);
console.log("Connect Streaming API(Integrated:Home)"); console.log(tlid + ":Connect Streaming API(Integrated:Home)");
console.log(mess);
$("#notice_icon_" + tlid).removeClass("red-text"); $("#notice_icon_" + tlid).removeClass("red-text");
} }
websocketLocal[wslid].onopen = function(mess) { websocketLocal[wslid].onopen = function(mess) {
localStorage.setItem("wssL_" + tlid, wslid); localStorage.setItem("wssL_" + tlid, wslid);
console.log("Connect Streaming API(Integrated:Local)"); console.log(tlid + ":Connect Streaming API(Integrated:Local)");
console.log(mess);
$("#notice_icon_" + tlid).removeClass("red-text"); $("#notice_icon_" + tlid).removeClass("red-text");
} }
websocketLocal[wslid].onmessage = function(mess) { websocketLocal[wslid].onmessage = function(mess) {
@ -195,7 +197,8 @@ function mixre(acct_id, tlid, TLtype, mute,delc,voice,mode) {
} }
} }
websocketLocal[wslid].onerror = function(error) { websocketLocal[wslid].onerror = function(error) {
console.error('WebSocket Error ' + error); console.error('WebSocketLocal Error')
console.error(error);
if(mode=="error"){ if(mode=="error"){
$("#notice_icon_" + tlid).addClass("red-text"); $("#notice_icon_" + tlid).addClass("red-text");
todo('WebSocket Error ' + error); todo('WebSocket Error ' + error);
@ -208,7 +211,7 @@ function mixre(acct_id, tlid, TLtype, mute,delc,voice,mode) {
} }
}; };
websocketLocal[wslid].onclose = function() { websocketLocal[wslid].onclose = function() {
console.error('WebSocketLocal Closing by error:' + tlid); console.log('WebSocketLocal Closing:' + tlid);
if(mode=="error"){ if(mode=="error"){
$("#notice_icon_" + tlid).addClass("red-text"); $("#notice_icon_" + tlid).addClass("red-text");
todo('WebSocket Closed'); todo('WebSocket Closed');
@ -221,7 +224,8 @@ function mixre(acct_id, tlid, TLtype, mute,delc,voice,mode) {
} }
}; };
websocketHome[wshid].onerror = function(error) { websocketHome[wshid].onerror = function(error) {
console.error('WebSocket Error ' + error); console.error('WebSocketHome Error')
console.error(error);
if(mode=="error"){ if(mode=="error"){
$("#notice_icon_" + tlid).addClass("red-text"); $("#notice_icon_" + tlid).addClass("red-text");
todo('WebSocket Error ' + error); todo('WebSocket Error ' + error);
@ -234,7 +238,7 @@ function mixre(acct_id, tlid, TLtype, mute,delc,voice,mode) {
} }
}; };
websocketHome[wshid].onclose = function() { websocketHome[wshid].onclose = function() {
console.error('WebSocketHome Closing by error:' + tlid); console.log('WebSocketHome Closing:' + tlid);
if(mode=="error"){ if(mode=="error"){
$("#notice_icon_" + tlid).addClass("red-text"); $("#notice_icon_" + tlid).addClass("red-text");
todo('WebSocket Closed'); todo('WebSocket Closed');

View File

@ -337,8 +337,8 @@ function reload(type, cc, acct_id, tlid, data, mute, delc, voice, mode) {
return false; return false;
}; };
websocket[wsid].onclose = function() { websocket[wsid].onclose = function() {
console.error("Closing"); console.log("Closing");
console.error(tlid); console.log(tlid);
if(mode=="error"){ if(mode=="error"){
$("#notice_icon_" + tlid).addClass("red-text"); $("#notice_icon_" + tlid).addClass("red-text");
todo('WebSocket Closed'); todo('WebSocket Closed');