in reply to managing log files
Once you have it in English, it's easy to translate to Perl, C++or anything else.
Note:English, in the above, is a placeholder for human language you're most comfortable writing in. 8-)