|
From: philip <ph...@wh...> - 2019-08-15 12:08:23
|
Hi all,
I had an experiment with this as it's blocking us rolling out the other
stuff since this commit.
Just to expand a bit:
Previously you'd have a logging setup that looks like:
log4j.logger.quickfixj.event=INFO
log4j.appender.stdout.layout.ConversionPattern=%c{1} %p
%d{yyyyMMdd-HH:mm:ss.SSS} - %m%m
And with the default configuration you'd get
event INFO 20190102-03:04:05.678 - 8=FIX.4.4....
With the original suffix this gives you nothing because the
fully-qualified logger name is:
"quickfixj.eventFIX.4.4:SENDER->TARGET: "
With it as a prefix it gives you nothing because you have to declare
something like this for every session.
log4j.logger.FIX.4.4:SENDER->TARGET.quickfixj.event=INFO
because the fully-qualified logger name is:
"FIX.4.4:SENDER->TARGET.quickfixj.event" and so the heirarchical
structure fails.
I made a change locally to make the fully-qualified logger name:
"quickfixj.event.FIX.4.4:SENDER->TARGET: "
But even this isn't usable as it gives:
4:SENDER->TARGET INFO 20190102-03:04:05.678 - 8=FIX.4.4....
I think we have to revert this change completely and rethink it. Maybe
we have to extend PatternLayout to provide the session ID as a parameter
instead.
Best regards,
On 2019-08-14 19:17, th...@ft... wrote:
> QuickFIX/J Documentation: http://www.quickfixj.org/documentation/
> QuickFIX/J Support: http://www.quickfixj.org/support/
>
>
>
> Hi Chris,
>
> Apologies for the delay in response. I just just saw where a
> resolution for this issue was entered in JIRA for version 2.2.0. I do
> not believe this will solve the problem. The issue is with the SLF4J
> logger categories.
>
> It appears the original intent of the code change was to eliminate the
> reallocation of the log message string for each log message
> (presumably for performance consideration). The problem is the logger
> “category” (a.k.a. “name") is also affected by the way it was
> implemented.
>
> For example, when setting the following configuration...
>
> SLF4JLogEventCategory=${senderCompID}.${targetCompID}.event
>
> One would expect “event” log messages to be sent to Log4J with
> category ’US.THEM.event’ when properties 'SenderCompID=US' and
> 'TargetCompID=THEM’. However, what occurs is the log category
> becomes 'US.THEM.eventFIX.4.4:US->THEM: ‘. The effect of this is to
> invalidate any Log4J configuration that is applicable to the expected
> QF/J configured SLF4J log categories.
>
> The category should not be changed if the apparent intent is to just
> prepend the SessionID in the actual log messages (which is the way it
> worked previously in QF/J 1.6.3 and before).
>
> All the current “fix” for QF/J 2.2.0 will do is make the category
> 'FIX.4.4:US->THEM: US.THEM.event’. This is still incorrect as the
> category does not match what is configured by
> ‘SLF4JLogEventCategory’.
>
> A quick review of the way Log4J categories work may be referenced in
> the “Architecture - Logger Hierarchy” section of the Log4J manual
> at https://logging.apache.org/log4j/2.x/manual/architecture.html. It
> is basically a namespace.
>
> Regards - Tommy
>
>> On Jul 11, 2019, at 3:24 AM, Christoph John
>> <chr...@ma...> wrote:
>>
>> Hi Tommy,
>>
>> sorry for the late reply.
>> Just to understand: you were not specifying the setting
>> SLF4JLogPrependSessionID=Y before? I mean you shouldn't because its
>> default seems to be Y.
>> And when you now put SLF4JLogPrependSessionID=N then the behaviour
>> is as before, i.e. with QFJ 1.6.3?
>>
>> Did the log filenames change or only the content of the files, i.e.
>> the logger name?
>>
>> Cheers,
>> Chris.
>>
>> On 26/04/2019 01:11, th...@ft... wrote:
>>
>> QuickFIX/J Documentation: http://www.quickfixj.org/documentation/
>> QuickFIX/J Support: http://www.quickfixj.org/support/
>>
>> Has anybody with authority had a chance to look at this? The
>> change introduced has the presumed unintended consequences of
>> breaking things for some of us using Log4J.
>>
>> Regards - Tommy
>>
>> On Apr 10, 2019, at 10:26 PM, th...@ft... wrote:
>>
>> I recently downloaded QF/J 2.1.1 and am upgrading from QF/J 1.6.3.
>> Most of the work was converting my application code to utilize the
>> ‘java.time’ package. I have everything running and going thru
>> some tests. In the process, I noticed log messages in files they
>> were not in before. We use Log4J and configure the following QF/J
>> properties…
>>
>> SLF4JLogEventCategory=${senderCompID}.${targetCompID}.event
>>
> SLF4JLogIncomingMessageCategory=${senderCompID}.${targetCompID}.msg.incoming
>>
> SLF4JLogOutgoingMessageCategory=${senderCompID}.${targetCompID}.msg.outgoing
>>
>> ..and the recently discovered (not in the user manual)…
>>
>>
> SLF4JLogErrorEventCategory=${senderCompID}.${targetCompID}.errorEvent
>>
>> I have spent hours reviewing and comparing QF/J source code trying
>> to determine what changed.
>>
>> It appears there is a configuration setting
>> 'SLF4JLogPrependSessionID’ described as "Controls whether session
>> ID is prepended to log message.”
>>
>> The behavior of this setting has been completely changed by the
>> following commit of source file ‘SLF4JLog.java’...
>>
>>
> https://github.com/quickfix-j/quickfixj/commit/0eb3359059d3551dde588f3cff6c836119141cf6#diff-82a6b6a09255551e3683d8943e3e4263
>>
>>
>> It appears the intent of this change did not create the desired
>> effect as my log “categories" now all have the SessionID appended.
>> (e.g. 'SENDER.TARGET.eventFIX.4.4:SENDER->TARGET: ')
>>
>> The current workaround is to configure... SLF4JLogPrependSessionID=N
>>
>>
>> Would someone please elaborate on the intended use of configuration
>> setting ‘SLF4JLogPrependSessionID’.
>>
>> Regards - Tommy
>>
>> _______________________________________________
>> Quickfixj-users mailing list
>> Qui...@li...
>> https://lists.sourceforge.net/lists/listinfo/quickfixj-users
>
> --
> Christoph John
> Software Engineering
> T +49 241 557080-28
> chr...@ma...
>
> MACD GmbH
> Oppenhoffallee 103
> 52066 Aachen, Germany
> www.macd.com [1]
>
> Amtsgericht Aachen: HRB 8151
> Ust.-Id: DE 813021663
> Geschäftsführer: George Macdonald
>
>
>
> Links:
> ------
> [1] http://www.macd.com/
> _______________________________________________
> Quickfixj-users mailing list
> Qui...@li...
> https://lists.sourceforge.net/lists/listinfo/quickfixj-users
|