Re: [Quickfix-developers] How to suppress 35=X messages in log file
Brought to you by:
orenmnero
From: Gunnar H. <gh...@hi...> - 2013-05-30 14:38:09
|
When deriving from FIX::FileLog and searching the message string for 35=X is the only way to supress these messages from getting logged w/o changing QF source then I will do that. I was just thinking that I was overlooking something simple because it seems logical to disable logging of 35=X messages when using FIX::FileLog. BTW. I like the QF library a lot! Thank you for your help! Gunnar On May 30, 2013, at 3:57 PM, Grant Birchmeier wrote: > I do agree: in retrospect, it would be nice if the engine would pass Message objects to the logger instead of strings. If you felt like hacking the engine, that change probably wouldn't be very hard. > > > On Thu, May 30, 2013 at 8:17 AM, Gunnar Harms <gh...@hi...> wrote: > Thanks Grant! > > Actually the application is finished so it is probably not a premature-mindset. > > The thing is that when in Sesison m_sttate->onOutgoing is called the MsgType is already in a variable. but in the flow that follows the MsgType is lost and only message string reaches the Log object's onOutgoing() method. > > It is just weird to look in message string with std::string compare method for the MsgType when it was known a couple steps before. > it would be better if MsgType is an actual argument of Log object's onOutgoing(); then i would not hesitate to derive from FileLogFactory and FileLog. > But still it would be better to already in session send methods determine not to put the message to the logger when 35=X > > > Regards, > Gunnar > > > > On May 30, 2013, at 2:39 PM, Grant Birchmeier wrote: > >> Are you sure it's a waste of time? Sounds like a premature-optimization mindset. >> >> Attempting it and profiling its performance sounds like an easier option than hacking the engine, and I don't think it would take that many man-hours. >> >> >> On Thu, May 30, 2013 at 2:52 AM, Gunnar Harms <gh...@hi...> wrote: >> QuickFIX Documentation: http://www.quickfixengine.org/quickfix/doc/html/index.html >> QuickFIX Support: http://www.quickfixengine.org/services.html >> >> >> Thanks Mike! >> >> I create an acceptor with a FIX::FileLogFactory because I do want the logging to file of all messages except the 35=X. I have stream and trade sessions. For the trade session i want all logging and for stream session all but the 35=X. So I think I use the appropriate constructor of the acceptor. >> >> Deriving from the FileLogFactory and from FileLog to create my own derived FileLog is probably easy but in the onOutgoing method of the Log object the message type is not available, only the message string and I don't want to search in the message string for 35=X because that is a waste of time and totally not nice. >> >> Regards, >> Gunnar >> >> >> >> >> Gunnar Harms >> >> On May 29, 2013, at 2:15 PM, Mike Gatny wrote: >> >>> It is typical to set PersistMessages=Y, ResetOnLogon=Y, and use the initator/acceptor constructor that takes no LogFactory argument. If you want to do more specific filtering, the LogFactory and Log interfaces exist for this reason and are simple to derive from. >>> >>> On May 29, 2013 6:41 AM, "Gunnar Harms" <gh...@hi...> wrote: >>> QuickFIX Documentation: http://www.quickfixengine.org/quickfix/doc/html/index.html >>> QuickFIX Support: http://www.quickfixengine.org/services.html >>> >>> Hi All, >>> >>> I want to suppress the 35=X messages in the FIX.4.2-<X>-<Y>.messages.current.log files and log all other messages (administrative, marketdatarequestrejects, etc.). >>> >>> It would be easy if i could derive my own Session class from FIX::Session and override the sendRaw/send methods to not make the m_state.onOutgoing( string ) call for these message types but this ssems not possible (because in acceptor class the sessions are created from calls to a locally defined SessionFactory variable). >>> >>> >>> What i could try is deriving from ScreenLogFactory (say MyScreenLogFactory), override in that class some create() method(s) to create not a ScreenLog but a derivation (say MyScreenLog) of it and in that derived class override onOutgoing(). But then I must search in the message string for subsstrings like 35=X which is a waste of time since in FIX::Session send methods is available the MsgType. >>> >>> Also some periodically running script to truncate the log files is far from optimal for obvious reasons. >>> >>> >>> I am perhaps missing something simple because I cannot imagine that writing each 35=X to log file is acceptable for other users of QF (for us it is really a show stopper, log files get toooo big). >>> >>> >>> Thanks for reading and for any help, >>> Gunnar >>> >>> >>> >>> >>> >>> ------------------------------------------------------------------------------ >>> Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET >>> Get 100% visibility into your production application - at no cost. >>> Code-level diagnostics for performance bottlenecks with <2% overhead >>> Download for free and get started troubleshooting in minutes. >>> http://p.sf.net/sfu/appdyn_d2d_ap1 >>> _______________________________________________ >>> Quickfix-developers mailing list >>> Qui...@li... >>> https://lists.sourceforge.net/lists/listinfo/quickfix-developers >> >> >> ------------------------------------------------------------------------------ >> Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET >> Get 100% visibility into your production application - at no cost. >> Code-level diagnostics for performance bottlenecks with <2% overhead >> Download for free and get started troubleshooting in minutes. >> http://p.sf.net/sfu/appdyn_d2d_ap1 >> _______________________________________________ >> Quickfix-developers mailing list >> Qui...@li... >> https://lists.sourceforge.net/lists/listinfo/quickfix-developers >> >> >> >> -- >> Grant Birchmeier >> Connamara Systems, LLC >> Made-To-Measure Trading Solutions. >> Exactly what you need. No more. No less. >> http://connamara.com > > > > > -- > Grant Birchmeier > Connamara Systems, LLC > Made-To-Measure Trading Solutions. > Exactly what you need. No more. No less. > http://connamara.com |