Certainly not directly answering your question, but I always wondered why most logging systems employ the rather primitive practice of appending a line to a text file, rather than writing the info to a database file which then could be read, aggregated, compared, selected, extracted, etc. in many different forms with some simple and standard SQL.
Somewhat more useful for your question: I think it is a bad idea to aggregate or combine log entries at the "logging" stage already. Perhaps you don't need now to know when and where something happened. But are you certain this information may not be needed next week/month/year by you or a colleague? "Knowledge is Power" (guard it well)! Far better -IMHO- to collect as much info as possible and then extract and rearrange into a report as per your needs at that moment.
A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James
My blog: Imperial Deltronics