FIX: add debug log
This commit is contained in:
parent
131d4b3d26
commit
2cd1de3e24
|
@ -406,6 +406,12 @@ func (session *ExchangeSession) initSymbol(ctx context.Context, environ *Environ
|
|||
return fmt.Errorf("market %s is not defined", symbol)
|
||||
}
|
||||
|
||||
if environ == nil {
|
||||
session.logger.Info("environment is nil")
|
||||
} else {
|
||||
session.logger.Infof("environment config: %+v", environ.environmentConfig)
|
||||
}
|
||||
|
||||
disableMarketDataStore := environ.environmentConfig != nil && environ.environmentConfig.DisableMarketDataStore
|
||||
disableSessionTradeBuffer := environ.environmentConfig != nil && environ.environmentConfig.DisableSessionTradeBuffer
|
||||
maxSessionTradeBufferSize := 0
|
||||
|
|
|
@ -122,6 +122,12 @@ func (trader *Trader) DisableLogging() {
|
|||
}
|
||||
|
||||
func (trader *Trader) Configure(userConfig *Config) error {
|
||||
// config environment
|
||||
if userConfig.Environment != nil && trader.environment != nil {
|
||||
trader.environment.environmentConfig = userConfig.Environment
|
||||
}
|
||||
|
||||
// config risk control
|
||||
if userConfig.RiskControls != nil {
|
||||
trader.SetRiskControls(userConfig.RiskControls)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user