package bootstrap

import (
	"fmt"
)

type LogAction struct {
	Output string `json:"output"`
}

func init() {
	Register("log", &LogAction{})
}

func (a *LogAction) Run(s *State) error {
	fmt.Println(interpolate(s, a.Output))
	return nil
}

package bootstrap

type LogAction struct {
	ID     string `json:"id"`
	Output string `json:"output"`
}

type LogMessage struct {
	Msg string `json:"message"`
}

func (l *LogMessage) String() string {
	return l.Msg
}

func init() {
	Register("log", &LogAction{})
}

func (a *LogAction) Run(s *State) error {
	s.StepData[a.ID] = &LogMessage{Msg: interpolate(s, a.Output)}
	return nil
}

Modify log action so JSON output is consistent
bootstrap: Modify log action so JSON output is consistent

Without this, the output stream includes non-JSON text when running with
--json=true

Signed-off-by: Lewis Marshall <748e1641a368164906d4a0c0e3965345453dcc93@lmars.net>
