Sorting Apache Log Files
lenny.self at qsent.com
Tue Jun 19 00:55:53 CEST 2001
I have a problem I was hoping someone might be able to help me with.
I have to different apache log files for the same same site and month
that need to be merged. Unfortuanlty, my web log reporting software
requires that the log entires be in order, if not it freaks out and
discards some of the enties.
So, I'm thinking I'll just write a little python scritpt to go though
the logs and sorth them before writing them out to a new file. Well,
I must say for the the idea of what to do is coming easier than
actually doing it. I was planning on loading each of the log files
into a list and then sorting the list. Unfortualy, I am unaware of
how to do that when the value I wish to search on isn't at the
beginning of the line. I need to search on Apache's date string.
Can anyone help me out?
More information about the Python-list