Commit d56157f1 by Manfred Touron

Using already-existing log command to print passed arguments

1 parent 788c9942
Showing with 1 additions and 2 deletions
...@@ -317,7 +317,6 @@ func (app *App) handleWS(w http.ResponseWriter, r *http.Request) { ...@@ -317,7 +317,6 @@ func (app *App) handleWS(w http.ResponseWriter, r *http.Request) {
} }
params := query.Query()["arg"] params := query.Query()["arg"]
if len(params) != 0 { if len(params) != 0 {
log.Printf("%s passed arguments are: %q", r.RemoteAddr, strings.Join(params, " "))
argv = append(argv, params...) argv = append(argv, params...)
} }
} }
...@@ -341,7 +340,7 @@ func (app *App) handleWS(w http.ResponseWriter, r *http.Request) { ...@@ -341,7 +340,7 @@ func (app *App) handleWS(w http.ResponseWriter, r *http.Request) {
log.Print("Failed to execute command") log.Print("Failed to execute command")
return return
} }
log.Printf("Command is running for client %s with PID %d", r.RemoteAddr, cmd.Process.Pid) log.Printf("Command is running for client %s with PID %d (args=%q)", r.RemoteAddr, cmd.Process.Pid, strings.Join(argv, " "))
context := &clientContext{ context := &clientContext{
app: app, app: app,
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!