Combining Log4FIX and The QuickFIX/J FileLog

June 28th, 2007

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.

Entry Filed under: General, Log4FIX

Leave a Comment

Required

Required, hidden

Some HTML allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>

Trackback this post  |  Subscribe to the comments via RSS Feed


Calendar

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

Most Recent Posts