diff --git a/builder/amazonebs/builder.go b/builder/amazonebs/builder.go index 95bbca767..ddfb5d628 100644 --- a/builder/amazonebs/builder.go +++ b/builder/amazonebs/builder.go @@ -23,7 +23,7 @@ type config struct { SourceAmi string `mapstructure:"source_ami"` InstanceType string `mapstructure:"instance_type"` SSHUsername string `mapstructure:"ssh_username"` - SSHPort int `mapstructure:"ssh_port"` + SSHPort int `mapstructure:"ssh_port"` // Configuration of the resulting AMI AMIName string `mapstructure:"ami_name"` diff --git a/packer/ui.go b/packer/ui.go index 00ee01f56..401c94cd8 100644 --- a/packer/ui.go +++ b/packer/ui.go @@ -3,6 +3,7 @@ package packer import ( "fmt" "io" + "log" ) // The Ui interface handles all communication for Packer with the outside @@ -21,14 +22,18 @@ type ReaderWriterUi struct { } func (rw *ReaderWriterUi) Say(format string, a ...interface{}) { - _, err := fmt.Fprintf(rw.Writer, format+"\n", a...) + output := fmt.Sprintf(format, a...) + log.Printf("ui: %s", output) + _, err := fmt.Fprint(rw.Writer, output+"\n") if err != nil { panic(err) } } func (rw *ReaderWriterUi) Error(format string, a ...interface{}) { - _, err := fmt.Fprintf(rw.Writer, format+"\n", a...) + output := fmt.Sprintf(format, a...) + log.Printf("ui error: %s", output) + _, err := fmt.Fprint(rw.Writer, output+"\n") if err != nil { panic(err) }