Revert "feat: allow existing logger from context (#859)" (#890)

This reverts commit 603cf56878.
This commit is contained in:
Ryan 2021-11-19 15:42:39 +01:00 committed by GitHub
parent df4ef4de80
commit 4ae71b5878
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -47,14 +47,7 @@ func WithJobLogger(ctx context.Context, jobName string, secrets map[string]strin
formatter.insecureSecrets = insecureSecrets formatter.insecureSecrets = insecureSecrets
nextColor++ nextColor++
var logger *logrus.Logger logger := logrus.New()
fieldLogger := common.Logger(ctx)
if fieldLogger != nil {
logger = fieldLogger.(*logrus.Logger)
}
if logger == nil {
logger = logrus.New()
}
logger.SetFormatter(formatter) logger.SetFormatter(formatter)
logger.SetOutput(os.Stdout) logger.SetOutput(os.Stdout)
logger.SetLevel(logrus.GetLevel()) logger.SetLevel(logrus.GetLevel())