我目前正在运行FIX启动器并成功连接到接受器。问题是,没有记录日志。应用程序的.cfg写在下面。
[DEFAULT]
ConnectionType=initiator
ReconnectInterval=2
ResetOnLogon=Y
FileStorePath=store
FileLogPath=logging
StartTime=00:00:00
EndTime=00:00:00
UseDataDictionary=Y
# standard config elements
[SESSION]
# inherit ConnectionType, ReconnectInterval and SenderCompID from default
BeginString=FIX.4.4
SenderCompID=INIT
TargetCompID=ACCEPT
SocketConnectHost=xxx
SocketConnectPort=xxx
HeartBtInt=30
DataDictionary=FIX44MD.xml
[SESSION]
BeginString=FIX.4.4
SenderCompID=INIT
TargetCompID=ACCEPT1
SocketConnectHost=xxx
SocketConnectPort=xxx
HeartBtInt=30
DataDictionary=FIX44OMS.xml
启动连接的代码摘录如下:
std::string file = argv[ 1 ];
FIX::SessionSettings settings( file );
Application application;
FIX::FileStoreFactory storeFactory( settings );
FIX::ScreenLogFactory logFactory( settings );
FIX::SocketInitiator initiator( application, storeFactory, settings, logFactory);
initiator.start();
application.run();
initiator.stop();
我非常确定问题与写入权限无关,因为我是以管理员身份运行应用程序。
答案 0 :(得分:0)
这是因为您正在使用ScreenLogFactory
,顾名思义,它只会登录到屏幕(例如您的终端)。
将其更改为FileLogFactory
,您应该开展业务。