Archive for June 28th, 2007

Combining Log4FIX and The QuickFIX/J FileLog

Here is a quick example showing how to use Log4FIX in live mode and the standard QuickFIX/J file log.

SessionSettings settings = ...
Log4FIX forLiveUpdate = Log4FIX.createForLiveUpdates(settings);
LogFactory log4FIXLogFactory = forLiveUpdate.getLogFactory(); 

LogFactory fileLogFactory = new FileLogFactory(settings);

// create a composite containing the Log4FIX LogFactory
// and the FileLogFactory
LogFactory compositeLogFactory = new CompositeLogFactory(new LogFactory[] {
         log4FIXLogFactory, fileLogFactory});  

initiator = new SocketInitiator(..., ..., ..., compositeLogFactory, ...);

...

// show the Log4FIX panel
forLiveUpdate.show();

Your QuickFIX/J application now sends log messages to Log4FIX and to a file.

Enjoy.

Add comment June 28th, 2007


Calendar

June 2007
M T W T F S S
« Mar    
 123
45678910
11121314151617
18192021222324
252627282930  

Posts by Month

Posts by Category