My tool to query apache logfiles via SQL seems suprisingly popular.
Just as a recap the process goes like this:
- Start the shell.
- A temporary SQLite database is created.
- You load any number of apache logfiles into it.
- Then queries may be executed against those records until you exit.
- The temporary database is dropped.
Now it is possible to save and load the SQLite database, so that you don't need to reparse the apache logs each time, that gives a nice speed increase for non-changing files.
By tonight I'll have aliases working for queries so you can bookmark them:
alias refers SELECT distinct(referer) FROM logs
Then in the future the 'refers' command will be available and will run the named query. Neat.
Now that I'm comfortable with SQL queries it just seems so natural, easy, and right to query logfiles this way. I guess that makes me strange.