|
From: Joerg T. <Joe...@ma...> - 2007-05-08 06:51:05
|
On 05/07/07 17:26, Tommy Hannon wrote: > QuickFIX/J Documentation: http://www.quickfixj.org/documentation/ > QuickFIX/J Support: http://www.quickfixj.org/support/ > Steve, > > Pardon me for the "black box" metaphor, I am not used to open source > products and forgot the source code was available. > > So, if I am currently using the 'FileLogPath' setting, I would need > to change and use the following settings... > > SLF4JLogEventCategory > SLF4JLogIncomingMessageCategory > SLF4JLogOutgoingMessageCategory > > Is that correct? Is there any examples to help get me started? Yes, see http://www.quickfixj.org/quickfixj/usermanual/usage/configuration.html#Logging for details. Here are the adapter jars for SLF4J in the QF/J 1.1.0 zip file: 6946 04-11-07 02:46 quickfixj/lib/optional/slf4j-log4j12-1.3.0.jar 7612 04-11-07 02:46 quickfixj/lib/slf4j-jdk14-1.3.0.jar All these adapter jars start with slf4j, next comes the destination log format: slf4j-log4j12 maps to log4j 1.2.x compatible logging slf4j-jdk14 maps to the standard java.util.logging introduced with JDK 1.4 Put exactly one of both in your class path and all stuff logged through SLF4J will go to the relevant logging interface. If you choose log4j, the log4j jar has to be in your path. The JDK 1.4 logging is part of your JRE. The core QF/J engine, e.g. the MINA subsystem, uses SLF4J. The event and messages loggers have to set programmatically. The code from http://www.quickfixj.org/quickfixj/usermanual/usage/application.html gets ... LogFactory logFactory = new SLF4JLogFactory(settings); ... Acceptor acceptor = new SocketAcceptor (application, storeFactory, settings, logFactory, messageFactory); This is important. Just changing the settings file does not help. You have to choose the logging factory in your program: LogFactory logFactory = new FileLogFactory(settings); LogFactory logFactory = new ScreenLogFactory(settings); LogFactory logFactory = new SLF4JLogFactory(settings); LogFactory logFactory = new JdbcLogFactory(settings); I would rather like this to be configurable from the settings. Could make a RFE for this. Cheers, Jörg > Thanks - Tommy > > On May 7, 2007, at 9:42 AM, Steve Bate wrote: > >> QuickFIX/J Documentation: http://www.quickfixj.org/documentation/ >> QuickFIX/J Support: http://www.quickfixj.org/support/ >>> I am using the 'java.util.logging' package for my own application >>> logging and rolling those okay, so I am somewhat familiar with the >>> type of settings you mention. However, due to my limited knowledge >>> and expertise with Java logging packages, I am not sure how to get at >>> the logging mechanism of the QFJ internals. Is there any >>> documentation and/or examples of how to get at the "black box" >>> loggers that are being used for the "message" and "event" logs? >> Hi Tommy, >> >> I'm not sure what you mean by "black box". The source >> code is available for the entire product. For session-specific >> logging the quickfix.Log implementations are used (SL4JLog, >> FileLog, JdbcLog, ...). For other logging SLF4J is used directly. >> SLF4J has adapter JAR files for both java.util.logging and Log4J >> (among others). >> >> Steve >> >> >> >> ---------------------------------------------------------------------- >> --- >> This SF.net email is sponsored by DB2 Express >> Download DB2 Express C - the FREE version of DB2 express and take >> control of your XML. No limits. Just data. Click to get it now. >> http://sourceforge.net/powerbar/db2/ >> _______________________________________________ >> Quickfixj-users mailing list >> Qui...@li... >> https://lists.sourceforge.net/lists/listinfo/quickfixj-users >> > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Quickfixj-users mailing list > Qui...@li... > https://lists.sourceforge.net/lists/listinfo/quickfixj-users > -- Joerg Thoennes http://www.macd.com Tel.: +49 (0)241 44597-24 Macdonald Associates GmbH Geschäftsführer: Roger Macdonald Lothringer Str. 52, D-52070 Aachen Amtsgericht Aachen, HRB 8151, Ust.-Id DE813021663 |