packer/rpc: Better logging in communicator

This commit is contained in:
Mitchell Hashimoto 2013-05-27 22:10:44 -07:00
parent b26ff7a6eb
commit 78ab1709cd
1 changed files with 2 additions and 1 deletions

View File

@ -218,6 +218,7 @@ func serveSingleCopy(name string, l net.Listener, dst io.Writer, src io.Reader)
conn, err := l.Accept()
if err != nil {
log.Printf("'%s' accept error: %s", name, err)
return
}
@ -231,6 +232,6 @@ func serveSingleCopy(name string, l net.Listener, dst io.Writer, src io.Reader)
written, err := io.Copy(dst, src)
log.Printf("%d bytes written for '%s'", written, name)
if err != nil {
log.Printf("'%s' copy error: %s", name, err.Error())
log.Printf("'%s' copy error: %s", name, err)
}
}