From af71b5e4a5aaf4bec98a851450950c8f7e8f94d6 Mon Sep 17 00:00:00 2001 From: c9s Date: Thu, 21 Nov 2024 12:17:51 +0800 Subject: [PATCH] xmaker: print config into bytes --- pkg/strategy/xmaker/strategy.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pkg/strategy/xmaker/strategy.go b/pkg/strategy/xmaker/strategy.go index e03650bf4..86d9e0e6c 100644 --- a/pkg/strategy/xmaker/strategy.go +++ b/pkg/strategy/xmaker/strategy.go @@ -1,11 +1,11 @@ package xmaker import ( + "bytes" "context" "fmt" "io" "math" - "os" "sync" "time" @@ -387,7 +387,6 @@ func (s *Strategy) Initialize() error { } } - s.PrintConfig(os.Stdout, true, false) return nil } @@ -1751,6 +1750,10 @@ func (s *Strategy) CrossRun( ) error { instanceID := s.InstanceID() + configWriter := bytes.NewBuffer(nil) + s.PrintConfig(configWriter, true, false) + s.logger.Infof("config: %s", configWriter.String()) + // configure sessions sourceSession, ok := sessions[s.SourceExchange] if !ok {