@@ -7,11 +7,11 @@ import (
77 "runtime"
88 "sync"
99
10+ "github.com/containerd/log"
1011 "github.com/docker/cli/cli/command"
1112 "github.com/moby/moby/api/pkg/stdcopy"
1213 "github.com/moby/moby/client"
1314 "github.com/moby/term"
14- "github.com/sirupsen/logrus"
1515)
1616
1717// The default escape key sequence: ctrl-p, ctrl-q
@@ -105,7 +105,7 @@ func (h *hijackedIOStreamer) setupInput() (restore func(), err error) {
105105 if h .detachKeys != "" {
106106 customEscapeKeys , err := term .ToBytes (h .detachKeys )
107107 if err != nil {
108- logrus .Warnf ("invalid detach escape keys, using default: %s" , err )
108+ log . G ( context . TODO ()) .Warnf ("invalid detach escape keys, using default: %s" , err )
109109 } else {
110110 escapeKeys = customEscapeKeys
111111 }
@@ -140,10 +140,10 @@ func (h *hijackedIOStreamer) beginOutputStream(restoreInput func()) <-chan error
140140 _ , err = stdcopy .StdCopy (h .outputStream , h .errorStream , h .resp .Reader )
141141 }
142142
143- logrus .Debug ("[hijack] End of stdout" )
143+ log . G ( context . TODO ()) .Debug ("[hijack] End of stdout" )
144144
145145 if err != nil {
146- logrus .Debugf ("Error receiveStdout: %s" , err )
146+ log . G ( context . TODO ()) .Debugf ("Error receiveStdout: %s" , err )
147147 }
148148
149149 outputDone <- err
@@ -164,7 +164,7 @@ func (h *hijackedIOStreamer) beginInputStream(restoreInput func()) (doneC <-chan
164164 // messages will be in normal type.
165165 restoreInput ()
166166
167- logrus .Debug ("[hijack] End of stdin" )
167+ log . G ( context . TODO ()) .Debug ("[hijack] End of stdin" )
168168
169169 if _ , ok := err .(term.EscapeError ); ok {
170170 detached <- err
@@ -175,12 +175,12 @@ func (h *hijackedIOStreamer) beginInputStream(restoreInput func()) (doneC <-chan
175175 // This error will also occur on the receive
176176 // side (from stdout) where it will be
177177 // propagated back to the caller.
178- logrus .Debugf ("Error sendStdin: %s" , err )
178+ log . G ( context . TODO ()) .Debugf ("Error sendStdin: %s" , err )
179179 }
180180 }
181181
182182 if err := h .resp .CloseWrite (); err != nil {
183- logrus .Debugf ("Couldn't send EOF: %s" , err )
183+ log . G ( context . TODO ()) .Debugf ("Couldn't send EOF: %s" , err )
184184 }
185185
186186 close (inputDone )
0 commit comments