|
From: Colin D. <co...@ma...> - 2020-12-30 17:12:15
|
Yes, this is possible. You have to use whatever logging system you are
using in your application to format the log messages and the log files.
For example, we use SLF4J and Log4J2, which means we use an instance of
quickfix.SLF4JLogFactory when we create our FIX sessions with QFJ.
For SLF4J, one uses some variant of log4j2.xml (like log4j2.xml,
spring-log4j2.xml, log4j2.properties, etc).
Here's the entry in log4j2.xml for FIX messages:
<RollingRandomAccessFile name="FIX-OUTGOING"
fileName="target/logs/fix-outgoing${instanceName}.log"
filePattern="target/logs/fix-outgoing${instanceName}-%d{yyyy-MM-dd-HH}-%i.log.gz"
append="true">
<PatternLayout pattern="%d{DATE} %m%n"/>
<Policies>
<SizeBasedTriggeringPolicy size="100 MB"/>
</Policies>
<DefaultRolloverStrategy max="1000"/>
</RollingRandomAccessFile>
This puts the current date in the file name (in the rollover logs,
actually, but it should give you the idea.
On 12/29/20 10:05 PM, Minh Kha wrote:
> QuickFIX/J Documentation: http://www.quickfixj.org/documentation/
> QuickFIX/J Support: http://www.quickfixj.org/support/
>
>
>
> Hi team,
> Firstly, I am appreciated for such an amazing project that you made
> for the community.
> I have a question about writing message log function through
> FileLogFactory, FileLog
>
> Currently I had a FIX.4.4-TTL-TEST-VXTGW.messages.logs created through
> the api quickfix provided. But there is a need to name that file which
> would include CurrentDate into that. Is there any way to accomplish
> this? Please let me know.
>
> Thank you
>
> Best regards,
> Kha Phan
>
> --
> *Phan Nguyen Minh Kha*
> min...@gm... <mailto:min...@gm...> / 0938499460
>
>
> _______________________________________________
> Quickfixj-users mailing list
> Qui...@li...
> https://lists.sourceforge.net/lists/listinfo/quickfixj-users
--
Colin DuPlantis
Chief Architect, Marketcetera
Download, Run, Trade
888.868.4884
https://www.marketcetera.com
|