File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed
Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -22,9 +22,9 @@ func main() {
2222 logFlags := & log.Flags {}
2323 rootCmd := & cobra.Command {
2424 Use : "manager [cmd]" ,
25- PersistentPreRunE : func (_ * cobra.Command , _ []string ) error {
25+ PersistentPreRun : func (cmd * cobra.Command , _ []string ) {
2626 logFlags .ConfigureLogging ()
27- return nil
27+ cmd . SetContext ( log . IntoContext ( cmd . Context (), log . GetLogger ()))
2828 },
2929 }
3030
Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ import (
2222 "testing"
2323 "time"
2424
25+ "github.com/cloudnative-pg/machinery/pkg/log"
2526 apimachineryTypes "k8s.io/apimachinery/pkg/types"
2627 "k8s.io/apimachinery/pkg/util/wait"
2728 kustomizeTypes "sigs.k8s.io/kustomize/api/types"
@@ -118,7 +119,10 @@ var _ = SynchronizedBeforeSuite(func(ctx SpecContext) []byte {
118119 }
119120
120121 return []byte {}
121- }, func (_ []byte ) {})
122+ }, func (_ []byte ) {
123+ logFlags := & log.Flags {}
124+ logFlags .ConfigureLogging ()
125+ })
122126
123127// Run e2e tests using the Ginkgo runner.
124128func TestE2E (t * testing.T ) {
You can’t perform that action at this time.
0 commit comments