Skip to content

Commit

Permalink
fix error reporting when watching documents
Browse files Browse the repository at this point in the history
  • Loading branch information
jryannel committed Sep 8, 2023
1 parent b9e119f commit 154c733
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/sol/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ func (r *Runner) WatchDoc(ctx context.Context, file string, doc *spec.SolutionDo
func (r *Runner) StopWatch(file string) {
err := r.tm.Cancel(file)
if err != nil {
log.Error().Err(err).Msgf("failed to stop watch %s", file)
log.Warn().Err(err).Msgf("stop watch %s", file)
}
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/tasks/task.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,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.Debug().Err(err).Msg("task run error")
log.Error().Err(err).Msgf("failed to run task %s", t.name)
}
}
case err := <-watcher.Errors:
Expand Down

0 comments on commit 154c733

Please sign in to comment.