Skip to content

Commit

Permalink
Remove dead code (nektos#1425)
Browse files Browse the repository at this point in the history
Co-authored-by: Casey Lee <[email protected]>
  • Loading branch information
memark and cplee authored Nov 16, 2022
1 parent 809da71 commit a108f10
Showing 1 changed file with 0 additions and 53 deletions.
53 changes: 0 additions & 53 deletions pkg/container/docker_logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a108f10

Please sign in to comment.