diff options
author | Casey Lee <cplee@nektos.com> | 2020-02-24 00:01:25 +0100 |
---|---|---|
committer | Casey Lee <cplee@nektos.com> | 2020-02-24 00:01:25 +0100 |
commit | 01876438c2f2c5493375019b7b033b8a67876a43 (patch) | |
tree | 7de98bfd8347ffb323fbe3dc5456f20a5d2d383b /pkg/common | |
parent | updates for tests (diff) | |
download | forgejo-act-01876438c2f2c5493375019b7b033b8a67876a43.tar.xz forgejo-act-01876438c2f2c5493375019b7b033b8a67876a43.zip |
shared container for job
Diffstat (limited to 'pkg/common')
-rw-r--r-- | pkg/common/executor.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/pkg/common/executor.go b/pkg/common/executor.go index f16de41..197cd5b 100644 --- a/pkg/common/executor.go +++ b/pkg/common/executor.go @@ -40,6 +40,15 @@ func NewInfoExecutor(format string, args ...interface{}) Executor { } } +// NewDebugExecutor is an executor that logs messages +func NewDebugExecutor(format string, args ...interface{}) Executor { + return func(ctx context.Context) error { + logger := Logger(ctx) + logger.Debugf(format, args...) + return nil + } +} + // NewPipelineExecutor creates a new executor from a series of other executors func NewPipelineExecutor(executors ...Executor) Executor { if len(executors) == 0 { |