mirror of
https://github.com/sorenisanerd/gotty.git
synced 2024-11-22 12:24:25 +00:00
Using already-existing log command to print passed arguments
This commit is contained in:
parent
788c9942ad
commit
d56157f1ee
@ -317,7 +317,6 @@ func (app *App) handleWS(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
params := query.Query()["arg"]
|
||||
if len(params) != 0 {
|
||||
log.Printf("%s passed arguments are: %q", r.RemoteAddr, strings.Join(params, " "))
|
||||
argv = append(argv, params...)
|
||||
}
|
||||
}
|
||||
@ -341,7 +340,7 @@ func (app *App) handleWS(w http.ResponseWriter, r *http.Request) {
|
||||
log.Print("Failed to execute command")
|
||||
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{
|
||||
app: app,
|
||||
|
Loading…
Reference in New Issue
Block a user