cleanup log messages

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
This commit is contained in:
Andrea Luzzardi
2021-02-23 16:37:45 -08:00
parent bc3305610b
commit 1fcb36113f
5 changed files with 39 additions and 25 deletions

View File

@@ -43,21 +43,18 @@ var computeCmd = &cobra.Command{
if err := env.SetUpdater(updater.Value()); err != nil {
lg.Fatal().Err(err).Msg("invalid updater script")
}
lg.Debug().Str("input", input.Value().SourceUnsafe()).Msg("Setting input")
lg.Debug().Str("input", input.Value().SourceUnsafe()).Msg("setting input")
if err := env.SetInput(input.Value()); err != nil {
lg.Fatal().Err(err).Msg("invalid input")
}
lg.Debug().Str("env state", env.State().SourceUnsafe()).Msg("creating client")
c, err := dagger.NewClient(ctx, "")
if err != nil {
lg.Fatal().Err(err).Msg("unable to create client")
}
lg.Info().Msg("running")
output, err := c.Compute(ctx, env)
if err != nil {
lg.Fatal().Err(err).Msg("failed to compute")
}
lg.Info().Msg("processing output")
fmt.Println(output.JSON())
},
}