Hello,
I do the following before the initiator/acceptor creation:
time_t ltime = time(0);
struct tm *newtime = gmtime(<ime);
#define DTSTRSIZE 17
char timestr[DTSTRSIZE];
strftime(timestr, DTSTRSIZE, "\\%Y%m%d", newtime);
typedef std::set<FIX::SessionID> TSessionsSet;
TSessionsSet TheSet = m_settings->getSessions();
TSessionsSet::iterator it = TheSet.begin();
if(it != TheSet.end())
{
FIX::SessionID SessionID = *it;
FIX::Dictionary Dictionary = m_settings->get(SessionID);
std::string path = Dictionary.getString(FIX::FILE_LOG_PATH);
FIX::file_mkdir(path.c_str());
path += timestr;
Dictionary.setString(FIX::FILE_LOG_PATH, path);
path = Dictionary.getString(FIX::FILE_STORE_PATH);
FIX::file_mkdir(path.c_str());
path += timestr;
Dictionary.setString(FIX::FILE_STORE_PATH, path);
m_settings->set(SessionID, Dictionary);
}
Regards,
Alexey Zubko
>
>
> ------------------------------------------------------------------------
>
> Subject:
> [Quickfix-developers] FileStorePath And FileLogPath with Date for
> Multiple Sessions
> From:
> "Joe Asta" <JA...@ru...>
> Date:
> Mon, 18 Jun 2007 15:59:42 -0400
> To:
> <qui...@li...>
>
> To:
> <qui...@li...>
>
>
> Is there a way to configure QuickFix to include a date in the path
> where the logs and store are created?
>
> I would like to see a new directory created for each day that contains
> the logs and store files for each of the sessions.
>
> It might look something like this:
>
> 20070601
> ->Session1
> -->logs
> --->[files for logs]
> -->store
> --->[files for store]
> ->Session2
> -->logs
> --->[files for logs]
> -->store
> --->[files for store]
> 20070602
> ->Session1
> -->logs
> --->[files for logs]
> -->store
> --->[files for store]
> ->Session2
> -->logs
> --->[files for logs]
> -->store
> --->[files for store]
>
> ------------------------------------------------------------------------
>
|