xmaker: print config into bytes

This commit is contained in:
c9s 2024-11-21 12:17:51 +08:00
parent f74ea33e53
commit af71b5e4a5
No known key found for this signature in database
GPG Key ID: 7385E7E464CB0A54

View File

@ -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 {