In the Write File task, make sure there is a loop reading the previous task's stdout, then set line break to NoLineBreak and set the value to:
{LOGIC(If|String|{STRING(Substring|{LOOP(CurrentValueXLine)}|0|5)}|==|Error|{LOOP(CurrentValueXLine)}
|)}
Test if the first 5 characters of the line are "Error". If so, return the line plus the carriage return (note the embedded carriage return) else return nothing. If you need to apply a more comples pattern, you may need to use a regular expression:
{LOGIC(If|String|{REGEX(Replace|{LOOP(CurrentValueXLine)}|^(Error).*|$1)}|==|Error|{LOOP(CurrentValueXLine)}
|)}
Here it's just looking to see if the line starts with "Error" but a more complex set of criteria could be allowed for.
Edited by user
2017-06-16T19:31:58Z
|
Reason: Not specified