summaryrefslogtreecommitdiffstats
path: root/pkg/common
diff options
context:
space:
mode:
authorCasey Lee <cplee@nektos.com>2020-02-24 00:01:25 +0100
committerCasey Lee <cplee@nektos.com>2020-02-24 00:01:25 +0100
commit01876438c2f2c5493375019b7b033b8a67876a43 (patch)
tree7de98bfd8347ffb323fbe3dc5456f20a5d2d383b /pkg/common
parentupdates for tests (diff)
downloadforgejo-act-01876438c2f2c5493375019b7b033b8a67876a43.tar.xz
forgejo-act-01876438c2f2c5493375019b7b033b8a67876a43.zip
shared container for job
Diffstat (limited to 'pkg/common')
-rw-r--r--pkg/common/executor.go9
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 {