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.
Leave a Comment
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