Commit 44c61e53 authored by Mitchell Hashimoto's avatar Mitchell Hashimoto

Some additional logging

parent 6d0fa84e
...@@ -4,6 +4,7 @@ import ( ...@@ -4,6 +4,7 @@ import (
"encoding/json" "encoding/json"
"errors" "errors"
"github.com/mitchellh/packer/packer" "github.com/mitchellh/packer/packer"
"log"
) )
type config struct { type config struct {
...@@ -34,6 +35,7 @@ func (b *Builder) Prepare(raw interface{}) (err error) { ...@@ -34,6 +35,7 @@ func (b *Builder) Prepare(raw interface{}) (err error) {
return return
} }
log.Printf("Config: %+v\n", b.config)
return return
} }
......
package packer package packer
import "log"
// A Build represents a single job within Packer that is responsible for // A Build represents a single job within Packer that is responsible for
// building some machine image artifact. Builds are meant to be parallelized. // building some machine image artifact. Builds are meant to be parallelized.
type Build interface { type Build interface {
...@@ -41,9 +43,14 @@ func (b *coreBuild) Name() string { ...@@ -41,9 +43,14 @@ func (b *coreBuild) Name() string {
// Prepare prepares the build by doing some initialization for the builder // Prepare prepares the build by doing some initialization for the builder
// and any hooks. This _must_ be called prior to Run. // and any hooks. This _must_ be called prior to Run.
func (b *coreBuild) Prepare() error { func (b *coreBuild) Prepare() (err error) {
b.prepareCalled = true b.prepareCalled = true
return b.builder.Prepare(b.rawConfig) err = b.builder.Prepare(b.rawConfig)
if err != nil {
log.Printf("Build '%s' prepare failure: %s\n", b.name, err)
}
return
} }
// Runs the actual build. Prepare must be called prior to running this. // Runs the actual build. Prepare must be called prior to running this.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment