mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-21 22:43:52 +00:00
FIX: add debug log
This commit is contained in:
parent
3cc96ff6ad
commit
129e2c438e
|
@ -405,6 +405,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