From 154c733f0f5fbd41a4eae92019c1b63c7c17000d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Ryannel?= Date: Fri, 8 Sep 2023 09:03:32 +0200 Subject: [PATCH] fix error reporting when watching documents --- pkg/sol/runner.go | 2 +- pkg/tasks/task.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/sol/runner.go b/pkg/sol/runner.go index aaed8b4b..7904b4e6 100644 --- a/pkg/sol/runner.go +++ b/pkg/sol/runner.go @@ -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) } } diff --git a/pkg/tasks/task.go b/pkg/tasks/task.go index 4895ea82..ad1e054f 100644 --- a/pkg/tasks/task.go +++ b/pkg/tasks/task.go @@ -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: