mirror of
https://gitea.com/gitea/act_runner.git
synced 2026-03-20 11:56:47 +08:00
Move logging to another file
This commit is contained in:
@@ -12,6 +12,7 @@ import (
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"gitea.com/gitea/act_runner/internal/app/run"
|
||||
"github.com/actions-oss/act-cli/pkg/artifactcache"
|
||||
"github.com/actions-oss/act-cli/pkg/artifacts"
|
||||
"github.com/actions-oss/act-cli/pkg/common"
|
||||
@@ -25,15 +26,6 @@ import (
|
||||
"golang.org/x/term"
|
||||
)
|
||||
|
||||
type JobLoggerFactoryWithInfoLevel struct{}
|
||||
|
||||
// WithJobLogger implements [runner.JobLoggerFactory].
|
||||
func (j *JobLoggerFactoryWithInfoLevel) WithJobLogger() *log.Logger {
|
||||
jobLogger := log.New()
|
||||
jobLogger.SetLevel(log.InfoLevel)
|
||||
return jobLogger
|
||||
}
|
||||
|
||||
type executeArgs struct {
|
||||
runList bool
|
||||
job string
|
||||
@@ -458,7 +450,7 @@ func runExec(ctx context.Context, execArgs *executeArgs) func(cmd *cobra.Command
|
||||
}
|
||||
|
||||
// TODO GITEA
|
||||
ctx = runner.WithJobLoggerFactory(ctx, &JobLoggerFactoryWithInfoLevel{})
|
||||
ctx = runner.WithJobLoggerFactory(ctx, &run.JobLoggerFactoryWithInfoLevel{})
|
||||
|
||||
r, err := runner.New(config)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user