@@ -113,8 +113,8 @@ func (c *command) run(ctx context.Context, command string, host *provider.HostCl
113113
114114 stdoutch := make (chan struct {})
115115 stderrch := make (chan struct {})
116- go copyOutput (ctx , host , urn , stdouttee , stdoutch )
117- go copyOutput (ctx , host , urn , stderrtee , stderrch )
116+ go copyOutput (ctx , host , urn , stdouttee , stdoutch , diag . Debug )
117+ go copyOutput (ctx , host , urn , stderrtee , stderrch , diag . Error )
118118
119119 err = cmd .Start ()
120120 pid := cmd .Process .Pid
@@ -140,11 +140,11 @@ func (c *command) run(ctx context.Context, command string, host *provider.HostCl
140140 return strings .TrimSuffix (stdoutbuf .String (), "\n " ), strings .TrimSuffix (stderrbuf .String (), "\n " ), id , nil
141141}
142142
143- func copyOutput (ctx context.Context , host * provider.HostClient , urn resource.URN , r io.Reader , doneCh chan <- struct {}) {
143+ func copyOutput (ctx context.Context , host * provider.HostClient , urn resource.URN , r io.Reader , doneCh chan <- struct {}, severity diag. Severity ) {
144144 defer close (doneCh )
145145 scanner := bufio .NewScanner (r )
146146 for scanner .Scan () {
147- err := host .Log (ctx , diag . Debug , urn , scanner .Text ())
147+ err := host .Log (ctx , severity , urn , scanner .Text ())
148148 if err != nil {
149149 return
150150 }
0 commit comments