Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add property to debug iso errors #636

Merged
merged 2 commits into from
Jan 23, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion jpos/src/main/java/org/jpos/iso/BaseChannel.java
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ public abstract class BaseChannel extends Observable
private static final int DEFAULT_TIMEOUT = 300000;
private int nextHostPort = 0;
private boolean roundRobin = false;
private boolean debugIsoError = true;

private Counter msgOutCounter;
private Counter msgInCounter;
Expand Down Expand Up @@ -834,7 +835,7 @@ else if (len > 0 && len <= getMaxPacketLength()) {
evt.addMessage ("--- header ---");
evt.addMessage (ISOUtil.hexdump (header));
}
if (b != null) {
if (b != null && debugIsoError) {
evt.addMessage ("--- data ---");
evt.addMessage (ISOUtil.hexdump (b));
}
Expand Down Expand Up @@ -1097,6 +1098,7 @@ public void setConfiguration (Configuration cfg)
keepAlive = cfg.getBoolean ("keep-alive", false);
expectKeepAlive = cfg.getBoolean ("expect-keep-alive", false);
roundRobin = cfg.getBoolean ("round-robin", false);
debugIsoError = cfg.getBoolean ("debug-iso-error", true);
if (socketFactory != this && socketFactory instanceof Configurable)
((Configurable)socketFactory).setConfiguration (cfg);
try {
Expand Down
Loading