Log & Hip Hop11.28.13 · ruby
If server logs could rap, they’d sound a lot like Mike Jones: Back then you didn’t tail me / Now I’m hot you all grep me! (See what I did there?)
Chainsaw automatically recognizes common log formats (Apache, Nginx, Ruby, Python, Rails, MongoDB, etc) and is super flexible. You can use relative (last week), complex (2 months ago Sunday at 1:00 pm), and specific (2013-10-01 - 2013-11-15) time strings. It also has a text filter so you can query simultaneously for time & content.
```bash $ chainsaw access.log 2 months ago Sunday at 1:00 pm # return log entries from target time until now.
$ chainsaw access.log -f GET last week # return all entries from last week forward containing the phrase GET.
$ chainsaw access.log -i october - 2013-11-15 # return entries from october through the middle of november and print them one-by-one when you hit return. ```
Chainsaw is easy to use, efficient, and plays well with others:
- Couple it with sendmail and cron to send out daily/weekly issue reports with corresponding log entries.
- Use Twilio’s API to trigger an SOS text whenever your app exceeds an event threshold.
And before I succumb to the ‘itis’, I’d like to give thanks. I’m thankful for your support, readership, and awesome feedback. Happy Turkey Day!
Join the discussion