-
Notifications
You must be signed in to change notification settings - Fork 121
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 option to replace binary separator with pipe #509
Add option to replace binary separator with pipe #509
Conversation
@Nadia-Adaptive Have you considered adding |
@@ -387,8 +405,8 @@ private static void print( | |||
{ | |||
final MessageStatus status = message.status(); | |||
final long timestamp = message.timestamp(); | |||
final String body = message.body(); | |||
System.out.printf("%1$20s: %2$s (%3$s)%n", timestamp, body, status); | |||
final String body = pipeDelimiter ? message.body().replace('\u0001', '|') : message.body(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know how far you would like to take this, but SOH
could also appear in data
fields, so you might end up with pipe symbols in fields that should not be replaced.
But I think this approach is good enough for the majority of cases.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, thanks. I think this is good enough for now, fix.core.debug.separator
doesn't handle data fields either.
We should implement this. |
@@ -387,8 +405,8 @@ private static void print( | |||
{ | |||
final MessageStatus status = message.status(); | |||
final long timestamp = message.timestamp(); | |||
final String body = message.body(); | |||
System.out.printf("%1$20s: %2$s (%3$s)%n", timestamp, body, status); | |||
final String body = pipeDelimiter ? message.body().replace('\u0001', '|') : message.body(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, thanks. I think this is good enough for now, fix.core.debug.separator
doesn't handle data fields either.
|
||
|
||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
formatting
A change to FixArchivePrinter to allow replacing the binary separator in the FIX message body with a pipe via program arguments.