Skip to content
This repository has been archived by the owner on Jun 14, 2023. It is now read-only.

Commit

Permalink
log status messages to stderr only
Browse files Browse the repository at this point in the history
  • Loading branch information
moshloop committed Jun 20, 2019
1 parent 498bd31 commit 769b1f7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ var (
date = "unknown"
)

func init() {
log.SetOutput(os.Stderr)
}
func main() {
var root = &cobra.Command{
Use: "konfigadm",
Expand All @@ -30,6 +33,7 @@ func main() {
default:
log.SetLevel(log.WarnLevel)
}
log.SetOutput(os.Stderr)
},
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/build/libguestfs.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func (l Libguestfs) Build(image string, config *os.File) {
--delete /tmp/builder.log \
--copy-in %s:/tmp \
--copy-in %s:/tmp \
--run-command '/tmp/%s apply -vv -c %s'`, image, konfigadmPath, config.Name(), konfigAdm, config.Name())
--run-command '/tmp/%s apply -vv -c %s' 1>&2`, image, konfigadmPath, config.Name(), konfigAdm, config.Name())

log.Infof("Executing %s\n", colorstring.Color("[light_green]"+cmdLine))
if err := utils.Exec(cmdLine); err != nil {
Expand Down

0 comments on commit 769b1f7

Please sign in to comment.