Have a look at the code below:
Now take a look at the below log output from running the above code:
The trade type is: ‘BLOCK’ so
we would expect the method to return true. However, it is returning false. It
is difficult to see what is going wrong from the above log statements.
A useful tip to improve your logging is to surround the {} in your log statements with square brackets: [] as shown underlined in red below:
When we rerun the above code with the improved log statements, it is immediately clear what the issue is (trailing white space in the trade type):