Explorar el Código

Merge pull request #322 from docker/fix_attach_logs

Fix logs replacement when streaming logs on windows
Djordje Lukic hace 5 años
padre
commit
8e8c868a70
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2 2
      cli/cmd/logs.go

+ 2 - 2
cli/cmd/logs.go

@@ -18,8 +18,8 @@ package cmd
 
 import (
 	"context"
-	"os"
 
+	"github.com/containerd/console"
 	"github.com/pkg/errors"
 	"github.com/spf13/cobra"
 
@@ -59,7 +59,7 @@ func runLogs(ctx context.Context, containerName string, opts logsOpts) error {
 	req := containers.LogsRequest{
 		Follow: opts.Follow,
 		Tail:   opts.Tail,
-		Writer: os.Stdout,
+		Writer: console.Current(),
 	}
 
 	return c.ContainerService().Logs(ctx, containerName, req)