[QFJ-769] Use both FileLogFactory and ScreenLogFactory Created: 17/Jan/14  Updated: 19/Jan/14  Resolved: 19/Jan/14

Status: Closed
Project: QuickFIX/J
Component/s: None
Affects Version/s: 1.5.3
Fix Version/s: None

Type: Improvement Priority: Default
Reporter: Cristian Manuel Vertiz Fernandez Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: QuickfixJ, session


 Description   

Allow to SocketInitiator and SocketAcceptor use both log ways, FileLogFactory and ScreenLogFactory to major control.



 Comments   
Comment by Cristian Manuel Vertiz Fernandez [ 17/Jan/14 ]

For example this java code:

mdInputStream = new BufferedInputStream( new FileInputStream( new File( MD_CONFIG_FILE )));
SessionSettings mdSettings = new SessionSettings(mdInputStream);
mdInputStream.close();

LogFactory mdScreenLogFactory = new ScreenLogFactory(true, true, true, true);
LogFactory mdFilelogFactory = new FileLogFactory(mdSettings);

MessageFactory messageFactory = new DefaultMessageFactory();

mdInitiator = new SocketInitiator(mdApplication, mdMessageStoreFactory, mdSettings, mdFilelogFactory, mdScreenLogFactory, messageFactory);
mdInitiator.start();

Comment by Steve Bate [ 18/Jan/14 ]

You can create an implementation of the Log interface that does whatever you want, including logging to multiple Log implementations. You can also use the SLF4JLog with Log4J and configure Log4J to log to a file and to the console.

Generated at Thu May 02 16:28:00 UTC 2024 using JIRA 7.5.2#75007-sha1:9f5725bb824792b3230a5d8716f0c13e296a3cae.