Skip to content

Commit

Permalink
update log messages related to solutions
Browse files Browse the repository at this point in the history
  • Loading branch information
jryannel committed Jun 29, 2023
1 parent e094bd0 commit ce3aef8
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion pkg/gen/generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ func (g *generator) WriteFile(input []byte, target string, force bool) error {

if same {
g.Stats.FilesSkipped++
log.Info().Msgf("skipping file %s", target)
log.Debug().Msgf("skipping file %s", target)
return nil
}
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/repos/registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func (r *registry) Load() error {
if err != nil {
return err
}
log.Info().Msgf("read registry file: %s", src)
log.Debug().Msgf("read registry file: %s", src)
// unmarshal
var registry TemplateRegistry
err = json.Unmarshal(bytes, &registry)
Expand Down
6 changes: 3 additions & 3 deletions pkg/sol/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ func RunSolutionSource(ctx context.Context, source string, force bool) error {
}

func runSolution(doc *spec.SolutionDoc) error {
log.Info().Msgf("run solution %s", doc.RootDir)
log.Debug().Msgf("run solution %s", doc.RootDir)
err := doc.Compute()
if err != nil {
return err
Expand Down Expand Up @@ -149,13 +149,13 @@ func runSolution(doc *spec.SolutionDoc) error {
}
// update template id based on the resolved repo id
layer.Template = repoId
log.Info().Msgf("using registered template %s", tplDir)
log.Debug().Msgf("using registered template %s", tplDir)
}
if tplDir == "" {
// we don't have a template
return fmt.Errorf("template is neither local nor registry template: %s", layer.Template)
}
log.Info().Msgf("using template dir %s", tplDir)
log.Info().Msgf("using template from: %s", tplDir)
rulesFile := helper.Join(tplDir, "rules.yaml")
if !helper.IsFile(rulesFile) {
return fmt.Errorf("rules document not found: %s", rulesFile)
Expand Down
2 changes: 1 addition & 1 deletion pkg/tasks/task.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ func (t *TaskItem) Watch(ctx context.Context, dependencies ...string) {
log.Debug().Msgf("modified file: %s", event.Name)
err := t.Run(ctx)
if err != nil {
log.Error().Err(err).Msg("failed to run task")
log.Debug().Err(err).Msg("task run error")
}
}
case err := <-watcher.Errors:
Expand Down

0 comments on commit ce3aef8

Please sign in to comment.