remove hijack on the client in logs, and split stdout / stderr

Upstream-commit: fbcd8503b3a29bdbb7a52d6433b0ab79877bc4ce
Component: engine
This commit is contained in:
Victor Vieux
2013-05-27 16:07:05 +00:00
parent 57720219a1
commit 3d5929f437

View File

@ -920,12 +920,10 @@ func (cli *DockerCli) CmdLogs(args ...string) error {
return nil
}
v := url.Values{}
v.Set("logs", "1")
v.Set("stdout", "1")
v.Set("stderr", "1")
if err := cli.hijack("POST", "/containers/"+cmd.Arg(0)+"/attach?"+v.Encode(), false); err != nil {
if err := cli.stream("POST", "/containers/"+cmd.Arg(0)+"/attach?logs=1&stdout=1", nil, os.Stdout); err != nil {
return err
}
if err := cli.stream("POST", "/containers/"+cmd.Arg(0)+"/attach?logs=1&stderr=1", nil, os.Stderr); err != nil {
return err
}
return nil