Move logging to another file

This commit is contained in:
Christopher Homberger
2026-02-22 17:34:18 +01:00
parent 340e1de2e3
commit cfbb124754
3 changed files with 28 additions and 41 deletions

View File

@@ -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 {