Re: [Quickfix-developers] Logging in QuickFIX
Brought to you by:
orenmnero
|
From: Erich <gra...@al...> - 2007-09-13 09:25:32
|
That's what I was afraid of! Oh well - Thanks anyway. Caleb Epstein wrote: > > QuickFIX Documentation: > http://www.quickfixengine.org/quickfix/doc/html/index.html > QuickFIX Support: http://www.quickfixengine.org/services.html > > On 9/12/07, Erich <gra...@al...> wrote: >> QuickFIX Documentation: >> http://www.quickfixengine.org/quickfix/doc/html/index.html >> QuickFIX Support: http://www.quickfixengine.org/services.html >> >> >> I've been doing some testing of QuickFIX performance and that suggests >> that I >> might want to run QuickFIX with a logging object. Now the only way I've >> found of doing this is to use the constructor for my acceptor without the >> logging object. Now this is a bit clunky as if I want to be able to make >> logging a configurabel option, e.g. >> >> If (logging) >> { >> FIX::ThreadSocketAcceptor acceptor(fixApp, storeFactory, settings, >> logFactory); >> ... >> } >> else >> { >> FIX::ThreadSocketAcceptor acceptor(fixApp, storeFactory, settings); >> acceptor.start(); >> ... >> } >> >> Is there a way of controlling this is the QuickFIX config? If I don't >> specify a file log path the app exits and I haven't found any other >> setting >> that seesm to relate to this. > > No, this can't be done purely with configuration, but you could make > that code a bit cleaner doing something like (untested, might need > some casts): > > NullLogFactory null_factory; > FileLogFactory file_factory; > LogFactory* log_factory = logging ? &file_factory : &null_factory; > ThreadedSocketAcceptor acceptor(fixApp, storeFactory, settings, > *log_factory); > > The implementation of the (unfortunately mythical) 'NullLogFactory' > is left as an exercise for the reader :^) > > -- > Caleb Epstein > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2005. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Quickfix-developers mailing list > Qui...@li... > https://lists.sourceforge.net/lists/listinfo/quickfix-developers > > -- View this message in context: http://www.nabble.com/Logging-in-QuickFIX-tf4430214.html#a12651550 Sent from the QuickFIX - Dev mailing list archive at Nabble.com. |