QuickFix.ConfigError: 配置失败: 未定义文件日志路径

本文关键字:文件 日志 未定义 路径 失败 ConfigError 配置 QuickFix | 更新日期: 2023-09-27 18:33:41

当我在我的快速修复配置文件中设置参数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 = new ThreadedSocketInitiator(application, fileStoreFactory, sessionSettings, fileLogFactory, messageFactory);

我得到例外

QuickFix.ConfigError: Configuration failed: FileLogPath not defined 

但是当对于文件日志工厂我设置直接路径时

                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

QuickFix.ConfigError: 配置失败: 未定义文件日志路径

请尝试移动

FileStorePath=incoming 
FileLogPath=outgoing 

在配置 [默认] 部分。