diff --git a/pkg/runner/logger.go b/pkg/runner/logger.go index 84648015..5819a50e 100644 --- a/pkg/runner/logger.go +++ b/pkg/runner/logger.go @@ -47,7 +47,14 @@ func WithJobLogger(ctx context.Context, jobName string, secrets map[string]strin formatter.insecureSecrets = insecureSecrets nextColor++ - logger := logrus.New() + var logger *logrus.Logger + fieldLogger := common.Logger(ctx) + if fieldLogger != nil { + logger = fieldLogger.(*logrus.Logger) + } + if logger == nil { + logger = logrus.New() + } logger.SetFormatter(formatter) logger.SetOutput(os.Stdout) logger.SetLevel(logrus.GetLevel())