Thanks for the replies, guys.
Unfortunately, the timestamp of a line can change during a single transaction while the log is being generated, so I don't think I can rely on that + thread ID as a unique identifier.
Another problem is that a transaction may start at the end of one log file and carry over onto the next log file.