Is it possible to suppress log messages in such a way that the FB log messages are suppressed but the actual messages from the task are logged? More specifically, I'm using the Subversion Generic task to do a Subversion log, with a --xml param, so I get XML. I use Log to Variable to save the output for a transformation later. However, the XML is wrapped by some messages from FinalBuilder, so I have to parse those out before I have valid XML to transform. Any ideas?
There isn’t any simple way to do this, apart from just using an Execute Program action to run svn (probably more fuss in the long run.)
However, you’ll probably find that FinalBuilder prints the same number of header and footer lines each time. This means you can use some JScript to slice off the excess, ie in the AfterAction event:
if (ActionResult) { var tmp = MyVar.split(’\n’); MyVar = tmp.slice(2,tmp.length - 3).join(’\n’); }
(Replace the numbers 2 and 3 with the beginning and ending offsets that you need to slice off.)
I am using script to parse out the extra lines and keep what I need, but your solution is more succinct than mine, and it give me some ideas to clean up some other code I’m using.