diff --git a/pkg/runner/logger.go b/pkg/runner/logger.go index 7b97927..f3cebce 100644 --- a/pkg/runner/logger.go +++ b/pkg/runner/logger.go @@ -84,7 +84,11 @@ func WithJobLogger(ctx context.Context, jobID string, jobName string, config *Co } logger.SetFormatter(formatter) logger.SetOutput(os.Stdout) - logger.SetLevel(logrus.TraceLevel) // to be aware of steps + if config.JobLoggerLevel != nil { + logger.SetLevel(*config.JobLoggerLevel) + } else { + logger.SetLevel(logrus.TraceLevel) + } rtn := logger.WithFields(logrus.Fields{ "job": jobName, "jobID": jobID, diff --git a/pkg/runner/runner.go b/pkg/runner/runner.go index 65dde5e..5aa1aae 100644 --- a/pkg/runner/runner.go +++ b/pkg/runner/runner.go @@ -59,6 +59,7 @@ type Config struct { ContainerNetworkMode string // the network mode of job containers DefaultActionInstance string // the default actions web site PlatformPicker func(labels []string) string // platform picker, it will take precedence over Platforms if isn't nil + JobLoggerLevel *log.Level // the level of job logger } type runnerImpl struct {