Skip to content

Commit

Permalink
enable log again
Browse files Browse the repository at this point in the history
  • Loading branch information
helderjs committed Aug 8, 2023
1 parent 197bb13 commit 2649b9f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
2 changes: 1 addition & 1 deletion test/e2e/encryption_at_rest_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const (
KeyName = "encryption-at-rest-test-key"
)

var _ = Describe("Encryption at REST test", Label("encryption-at-rest"), func() {
var _ = FDescribe("Encryption at REST test", Label("encryption-at-rest"), func() {
var testData *model.TestDataProvider

_ = BeforeEach(func() {
Expand Down
16 changes: 13 additions & 3 deletions test/e2e/k8s/operator.go
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
package k8s

import (
"errors"
"fmt"
"os"
"path"
"strings"
"time"

"go.uber.org/zap/zaptest"

. "github.com/onsi/ginkgo/v2"

"github.com/go-logr/zapr"
"go.uber.org/zap"
"go.uber.org/zap/zapcore"
Expand Down Expand Up @@ -46,7 +48,13 @@ func RunOperator(initCfg *Config) (manager.Manager, error) {
if err != nil {
return nil, fmt.Errorf("failed to create log directory: %w", err)
}
logger, err := initCustomZapLogger(config.LogLevel, config.LogEncoder, path.Join(config.LogDir, "operator.log"))
//logger, err := initCustomZapLogger(config.LogLevel, config.LogEncoder, path.Join(config.LogDir, "operator.log"))
logger := zaptest.NewLogger(
GinkgoT(),
zaptest.WrapOptions(
zap.ErrorOutput(zapcore.Lock(zapcore.AddSync(GinkgoWriter))),
),
)
if err != nil {
return nil, fmt.Errorf("failed to initialize custom zap logger: %w", err)
}
Expand Down Expand Up @@ -205,6 +213,7 @@ func mergeConfiguration(initCfg *Config) *Config {
return config
}

/*
func initCustomZapLogger(level, encoding, logFileName string) (*zap.Logger, error) {
lv := zap.AtomicLevel{}
err := lv.UnmarshalText([]byte(strings.ToLower(level)))
Expand Down Expand Up @@ -233,3 +242,4 @@ func initCustomZapLogger(level, encoding, logFileName string) (*zap.Logger, erro
}
return cfg.Build()
}
*/

0 comments on commit 2649b9f

Please sign in to comment.