The "simpler, better" way is to not produce XML in the first place. Just produce a plain old text log file.
As you note, there is no root element. That's a serious defect for something which claims to produce XML. There's no start tag for the document and no end tag. However if you're committed to parsing the log as XML, your first step is to make it into XML. Put a start tag at the beginning and an end tag at the end, and make the start tag declare the "log4j" prefix with some namespace URI.
You don't need a temporary file for that either. A SequenceInputStream which combines three InputStreams (the start tag, the log data, the end tag) would do just fine.