Add basic log support

This commit is contained in:
Michael Crosby 2015-11-13 13:22:42 -08:00
parent f9ad7970d2
commit 0136213e78
392 changed files with 56 additions and 47867 deletions

View file

@ -217,6 +217,11 @@ func (s *server) createContainer(w http.ResponseWriter, r *http.Request) {
e := containerd.NewEvent(containerd.StartContainerEventType)
e.ID = id
e.BundlePath = c.BundlePath
logrus.Debug(c.Stderr, c.Stdout)
e.Stdio = &containerd.Stdio{
Stderr: c.Stderr,
Stdout: c.Stdout,
}
s.supervisor.SendEvent(e)
if err := <-e.Err; err != nil {
code := http.StatusInternalServerError

View file

@ -19,6 +19,8 @@ type Container struct {
ID string `json:"id,omitempty"`
BundlePath string `json:"bundlePath,omitempty"`
Processes []Process `json:"processes,omitempty"`
Stdout string `json:"stdout,omitempty"`
Stderr string `json:"stderr,omitempty"`
State *ContainerState `json:"state,omitempty"`
}