channel err logging

This commit is contained in:
Liang Ding 2015-03-20 16:49:58 +08:00
parent 8c1a705a6a
commit ec22bcd3ad
8 changed files with 21 additions and 21 deletions

View File

@ -245,7 +245,7 @@ func BuildHandler(w http.ResponseWriter, r *http.Request) {
wsChannel := session.OutputWS[sid]
err := wsChannel.WriteJSON(&channelRet)
if nil != err {
logger.Error(err)
logger.Warn(err)
}
wsChannel.Refresh()

View File

@ -94,7 +94,7 @@ func GoGetHandler(w http.ResponseWriter, r *http.Request) {
err := wsChannel.WriteJSON(&channelRet)
if nil != err {
logger.Error(err)
logger.Warn(err)
return
}
@ -137,7 +137,7 @@ func GoGetHandler(w http.ResponseWriter, r *http.Request) {
err := wsChannel.WriteJSON(&channelRet)
if nil != err {
logger.Error(err)
logger.Warn(err)
}
wsChannel.Refresh()

View File

@ -188,7 +188,7 @@ func GoInstallHandler(w http.ResponseWriter, r *http.Request) {
wsChannel := session.OutputWS[sid]
err := wsChannel.WriteJSON(&channelRet)
if nil != err {
logger.Error(err)
logger.Warn(err)
}
wsChannel.Refresh()

View File

@ -98,7 +98,7 @@ func RunHandler(w http.ResponseWriter, r *http.Request) {
err := wsChannel.WriteJSON(&channelRet)
if nil != err {
logger.Error(err)
logger.Warn(err)
return
}
@ -125,7 +125,7 @@ func RunHandler(w http.ResponseWriter, r *http.Request) {
channelRet["output"] = ""
err := wsChannel.WriteJSON(&channelRet)
if nil != err {
logger.Error(err)
logger.Warn(err)
return
}
@ -146,7 +146,7 @@ func RunHandler(w http.ResponseWriter, r *http.Request) {
r, _, err := outReader.ReadRune()
if nil != err {
// remove the exited process from user process set
// remove the exited process from user's process set
Processes.Remove(wSession, cmd.Process)
logger.Debugf("User [%s, %s] 's running [id=%d, file=%s] has done [stdout %v], ", wSession.Username, sid, runningId, filePath, err)
@ -155,7 +155,7 @@ func RunHandler(w http.ResponseWriter, r *http.Request) {
channelRet["output"] = buf.content
err := wsChannel.WriteJSON(&channelRet)
if nil != err {
logger.Error(err)
logger.Warn(err)
break
}
@ -184,7 +184,7 @@ func RunHandler(w http.ResponseWriter, r *http.Request) {
err = wsChannel.WriteJSON(&channelRet)
if nil != err {
logger.Error(err)
logger.Warn(err)
break
}
@ -222,7 +222,7 @@ func RunHandler(w http.ResponseWriter, r *http.Request) {
err = wsChannel.WriteJSON(&channelRet)
if nil != err {
logger.Error(err)
logger.Warn(err)
break
}

View File

@ -95,7 +95,7 @@ func GoTestHandler(w http.ResponseWriter, r *http.Request) {
err := wsChannel.WriteJSON(&channelRet)
if nil != err {
logger.Error(err)
logger.Warn(err)
return
}
@ -140,7 +140,7 @@ func GoTestHandler(w http.ResponseWriter, r *http.Request) {
err := wsChannel.WriteJSON(&channelRet)
if nil != err {
logger.Error(err)
logger.Warn(err)
}
wsChannel.Refresh()

View File

@ -95,7 +95,7 @@ func GoVetHandler(w http.ResponseWriter, r *http.Request) {
err := wsChannel.WriteJSON(&channelRet)
if nil != err {
logger.Error(err)
logger.Warn(err)
return
}
@ -140,7 +140,7 @@ func GoVetHandler(w http.ResponseWriter, r *http.Request) {
err := wsChannel.WriteJSON(&channelRet)
if nil != err {
logger.Error(err)
logger.Warn(err)
}
wsChannel.Refresh()

View File

@ -96,7 +96,7 @@ func RunHandler(w http.ResponseWriter, r *http.Request) {
err := wsChannel.WriteJSON(&channelRet)
if nil != err {
logger.Error(err)
logger.Warn(err)
return
}
@ -123,7 +123,7 @@ func RunHandler(w http.ResponseWriter, r *http.Request) {
channelRet["output"] = ""
err := wsChannel.WriteJSON(&channelRet)
if nil != err {
logger.Error(err)
logger.Warn(err)
return
}
@ -153,7 +153,7 @@ func RunHandler(w http.ResponseWriter, r *http.Request) {
channelRet["output"] = buf.content
err := wsChannel.WriteJSON(&channelRet)
if nil != err {
logger.Error(err)
logger.Warn(err)
break
}
@ -182,7 +182,7 @@ func RunHandler(w http.ResponseWriter, r *http.Request) {
err = wsChannel.WriteJSON(&channelRet)
if nil != err {
logger.Error(err)
logger.Warn(err)
break
}
@ -220,7 +220,7 @@ func RunHandler(w http.ResponseWriter, r *http.Request) {
err = wsChannel.WriteJSON(&channelRet)
if nil != err {
logger.Error(err)
logger.Warn(err)
break
}

View File

@ -95,7 +95,7 @@ func CloneHandler(w http.ResponseWriter, r *http.Request) {
err := wsChannel.WriteJSON(&channelRet)
if nil != err {
logger.Error(err)
logger.Warn(err)
return
}
@ -132,7 +132,7 @@ func CloneHandler(w http.ResponseWriter, r *http.Request) {
err := wsChannel.WriteJSON(&channelRet)
if nil != err {
logger.Error(err)
logger.Warn(err)
}
wsChannel.Refresh()