It would be nice if we could extract the loop body into a separate function. Having a long loop body isn't something good. Consider having a new function `processLog(const string &LogFileName, bool Reversed)`.