3

当我在我的 quickfix 配置文件中设置参数 FileLogPath (值:传出)并尝试执行以下操作时:

                SessionSettings sessionSettings = new SessionSettings(CfgFile);
                FileStoreFactory fileStoreFactory = new FileStoreFactory(sessionSettings);
                FileLogFactory fileLogFactory = new FileLogFactory(sessionSettings); 
                ScreenLogFactory screenLogFactory = new ScreenLogFactory(sessionSettings);
                MessageFactory messageFactory = new DefaultMessageFactory();

之后尝试使用以下命令初始化 socketInitiator:

socketInitiator = new ThreadedSocketInitiator(application, fileStoreFactory, sessionSettings, fileLogFactory, messageFactory);

我得到异常

QuickFix.ConfigError: Configuration failed: FileLogPath not defined 

但是当我为 FileLogFactory 设置直接路径时

                FileLogFactory fileLogFactory = new FileLogFactory("outgoing"); 

一切正常。

我究竟做错了什么?

配置文件看起来像这样:

[DEFAULT]
[SESSION]
ConnectionType=initiator
HeartBtInt=30
ReconnectInterval=5
FileStorePath=incoming
FileLogPath=outgoing
SenderSubId=xxxxx
Password=yyyyy
StartTime=00:00:00
EndTime=00:00:00
SocketConnectHost=aaa.aaa.aaa.aaa
SocketConnectPort=bbb
CheckLatency=N
BeginString=FIX.4.4
SenderCompId=rrrrrr
TargetCompId=vvvvvv
DataDictionary=./Specs/FIX44.xml
ValidateUserDefinedFields=N
4

1 回答 1

11

请尝试移动

FileStorePath=incoming 
FileLogPath=outgoing 

在配置 [DEFAULT] 部分。

于 2012-05-15T10:18:58.387 回答