jPOS
jPOS copied to clipboard
Add comment to dump Bitmap in the ISOMsg dump.
https://github.com/jpos/jPOS/blob/866254a44f1652977d2f607c8bc9e49fc21cfeff/jpos/src/main/java/org/jpos/iso/ISOMsg.java#L523
It would be nice to add a comment here, something to the effect
/*
If you want the bitmap dumped in the log, change the condition from (i >= 0) to (i >= -1).
*/
In the older version of jPOS there was commented out code to do it and since I needed it, I went with customizing it to use -1.
<isomsg direction="incoming">
<!-- org.jpos.iso.packager.GenericPackager[cfg/banknet_ebcidic_pci.xml] -->
<field id="bitmap" value="{2, 3, 4, 6, 7, 10, 11, 12, 13, 14, 15, 16, 18, 22, 28, 32, 33, 35, 37, 41, 42, 43, 48, 49, 51, 61, 63}" type="bitmap"/>
<field id="0" value="0100"/>
...
...
Enabled fields are shown in their respective XML elements? Why would you want to dump an interpreted version of the bitmap?
When packager-debug is enabled, then the bitmap gets dumped if that's what you need.
That said, if you want to add that comment, I'm fine with it, feel free to send a PR.
Enabled fields are shown in their respective XML elements? Why would you want to dump an interpreted version of the bitmap?
Its something the client wanted.
When packager-debug is enabled, then the bitmap gets dumped if that's what you need.
That does excessive logging.
There's a subtle problem here. If this is a new ISOMsg you are creating, and it didn't get packed already, then there would be no bitmap. I think a good trade off is to log this info in the TransactionManager, using ctx.log.
That said, I'll keep this issue open in case we figure out a good configurable solution.