From 8a09d044c7466efae6a84f4c30577e963b3d81d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs=20Espino?= Date: Sat, 16 Oct 2021 21:12:26 +0200 Subject: [PATCH 1/2] Adding task started and task finished in the verbose otput --- task.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/task.go b/task.go index 231552aa..6ad253e8 100644 --- a/task.go +++ b/task.go @@ -310,6 +310,7 @@ func (e *Executor) RunTask(ctx context.Context, call taskfile.Call) error { defer release() return e.startExecution(ctx, t, func(ctx context.Context) error { + e.Logger.VerboseErrf(logger.Magenta, `started task: '%s'`, call.Task) if err := e.runDeps(ctx, t); err != nil { return err } @@ -351,6 +352,7 @@ func (e *Executor) RunTask(ctx context.Context, call taskfile.Call) error { return &taskRunError{t.Task, err} } } + e.Logger.VerboseErrf(logger.Magenta, `finished task: '%s'`, call.Task) return nil }) } From 690000254c94795a1235140d5900d41f625cb11d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs=20Espino?= Date: Sun, 31 Oct 2021 09:37:23 +0100 Subject: [PATCH 2/2] Apply suggestions from code review Co-authored-by: Andrey Nering --- task.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/task.go b/task.go index 6ad253e8..17f1655b 100644 --- a/task.go +++ b/task.go @@ -310,7 +310,7 @@ func (e *Executor) RunTask(ctx context.Context, call taskfile.Call) error { defer release() return e.startExecution(ctx, t, func(ctx context.Context) error { - e.Logger.VerboseErrf(logger.Magenta, `started task: '%s'`, call.Task) + e.Logger.VerboseErrf(logger.Magenta, `task: "%s" started`, call.Task) if err := e.runDeps(ctx, t); err != nil { return err } @@ -352,7 +352,7 @@ func (e *Executor) RunTask(ctx context.Context, call taskfile.Call) error { return &taskRunError{t.Task, err} } } - e.Logger.VerboseErrf(logger.Magenta, `finished task: '%s'`, call.Task) + e.Logger.VerboseErrf(logger.Magenta, `task: "%s" finished`, call.Task) return nil }) }