Add configurable logging level for jobs
This changes the default for JobLoggerLevel from "trace" to "info". Closes #298
This commit is contained in:
parent
907588cef5
commit
71149e36fa
3 changed files with 16 additions and 1 deletions
|
@ -232,6 +232,15 @@ func (r *Runner) run(ctx context.Context, task *runnerv1.Task, reporter *report.
|
|||
Inputs: inputs,
|
||||
}
|
||||
|
||||
if r.cfg.Log.JobLevel != "" {
|
||||
level, err := log.ParseLevel(r.cfg.Log.JobLevel)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
runnerConfig.JobLoggerLevel = &level
|
||||
}
|
||||
|
||||
rr, err := runner.New(runnerConfig)
|
||||
if err != nil {
|
||||
return err
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue