From 4e37625c93dd83f8aa6dbe4579ba3e9453c3ca1a Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Tue, 23 Dec 2014 17:25:00 +0800 Subject: [PATCH] logging --- output/outputs.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/output/outputs.go b/output/outputs.go index f4d1726..23516ae 100644 --- a/output/outputs.go +++ b/output/outputs.go @@ -150,7 +150,7 @@ func RunHandler(w http.ResponseWriter, r *http.Request) { defer util.Recover() defer cmd.Wait() - logger.Debugf("Session [%s] is running [id=%d, file=%s]", sid, runningId, filePath) + logger.Debugf("User [%s, %s] is running [id=%d, file=%s]", wSession.Username, sid, runningId, filePath) // push once for front-end to get the 'run' state and pid if nil != wsChannel { @@ -183,7 +183,7 @@ func RunHandler(w http.ResponseWriter, r *http.Request) { // remove the exited process from user process set processes.remove(wSession, cmd.Process) - logger.Tracef("Session [%s] 's running [id=%d, file=%s] has done [stdout %v], ", sid, runningId, filePath, err) + logger.Tracef("User [%s, %s] 's running [id=%d, file=%s] has done [stdout %v], ", wSession.Username, sid, runningId, filePath, err) if nil != wsChannel { channelRet["cmd"] = "run-done"