More logging, some tweaks to the format

This commit is contained in:
Mitchell Hashimoto 2013-05-08 12:43:41 -07:00
parent 26a998f721
commit 286f0aa91c
3 changed files with 5 additions and 3 deletions

View File

@ -11,6 +11,8 @@ import (
)
func main() {
log.SetFlags(log.Ldate | log.Ltime | log.Llongfile)
commands := map[string]string {
"build": "packer-build",
}

View File

@ -38,6 +38,7 @@ func CleanupClients() {
}()
}
log.Println("waiting for all plugin processes to complete...")
wg.Wait()
}
@ -91,6 +92,7 @@ func (c *client) Start() (address string, err error) {
// Start goroutine to wait for process to exit
go func() {
c.cmd.Wait()
log.Println("plugin process exited")
c.exited = true
}()
@ -159,7 +161,7 @@ func (c *client) logStderr(r io.Reader) {
}
var err error
for err == nil {
for err != io.EOF {
var line string
line, err = buf.ReadString('\n')
if line != "" {

View File

@ -77,6 +77,4 @@ func ServeCommand(command packer.Command) {
if err := serve(server); err != nil {
log.Panic(err)
}
log.Println("Command successfully served. Exiting.")
}