in reply to Issue merging 2 log files.

Your snippet won't compile (multiple syntax errors) because you have one too many "(" <update> after the if around the condition </update> or one too few ")" at the end of line 6 (and your inconsistent placement of the curly-braces may make that harder for you to spot?).

Assuming that's only a cut-and-paste error in the post, might the problem be insufficient memory? The failure only after growth of the logfiles into the area of a gigabyte sounds like a clue.