diff --git a/pkg/container/docker_logger.go b/pkg/container/docker_logger.go index 5c85785..b6b2f15 100644 --- a/pkg/container/docker_logger.go +++ b/pkg/container/docker_logger.go @@ -22,59 +22,6 @@ type dockerMessage struct { const logPrefix = " \U0001F433 " -/* -func logDockerOutput(ctx context.Context, dockerResponse io.Reader) { - logger := common.Logger(ctx) - if entry, ok := logger.(*logrus.Entry); ok { - w := entry.Writer() - _, err := stdcopy.StdCopy(w, w, dockerResponse) - if err != nil { - logrus.Error(err) - } - } else if lgr, ok := logger.(*logrus.Logger); ok { - w := lgr.Writer() - _, err := stdcopy.StdCopy(w, w, dockerResponse) - if err != nil { - logrus.Error(err) - } - } else { - logrus.Errorf("Unable to get writer from logger (type=%T)", logger) - } -} -*/ - -/* -func streamDockerOutput(ctx context.Context, dockerResponse io.Reader) { - /* - out := os.Stdout - go func() { - <-ctx.Done() - //fmt.Println() - }() - - _, err := io.Copy(out, dockerResponse) - if err != nil { - logrus.Error(err) - } - * / - - logger := common.Logger(ctx) - reader := bufio.NewReader(dockerResponse) - - for { - if ctx.Err() != nil { - break - } - line, _, err := reader.ReadLine() - if err == io.EOF { - break - } - logger.Debugf("%s\n", line) - } - -} -*/ - func logDockerResponse(logger logrus.FieldLogger, dockerResponse io.ReadCloser, isError bool) error { if dockerResponse == nil { return nil