Skip to content

Commit

Permalink
[TS-2413] Added logging
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikita-Smirnov-Exactpro committed Jul 12, 2024
1 parent be494c8 commit cc3a2f6
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/main/java/com/exactpro/th2/FixHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -1401,10 +1401,13 @@ private void transformProcessor(
ByteBuf message,
Map<String, String> metadata
) {
Set<String> disableForMessageTypes = strategy.getDisableForMessageTypes();

FixField msgTypeField = findField(message, MSG_TYPE_TAG, US_ASCII);
if(msgTypeField == null || msgTypeField.getValue() == null || disableForMessageTypes.contains(msgTypeField.getValue())) {
if(msgTypeField == null || msgTypeField.getValue() == null) {
return;
}
Set<String> disableForMessageTypes = strategy.getDisableForMessageTypes();
if (disableForMessageTypes.contains(msgTypeField.getValue())) {
LOGGER.info("Strategy '{}' is disabled for {} message type", strategy.getType(), msgTypeField.getValue());
return;
}

Expand Down Expand Up @@ -1583,6 +1586,7 @@ private Map<String, String> fakeRetransmissionOutgoingProcessor(ByteBuf message,
Set<String> disableForMessageTypes = strategy.getDisableForMessageTypes();
FixField msgTypeField = findField(message, MSG_TYPE_TAG, US_ASCII);
if(msgTypeField != null && msgTypeField.getValue() != null && disableForMessageTypes.contains(msgTypeField.getValue())) {
LOGGER.info("Strategy '{}' is disabled for {} message type", strategy.getType(), msgTypeField.getValue());
return null;
}

Expand Down

0 comments on commit cc3a2f6

Please sign in to comment.