I use this command very frequently to check how often an event occurs in a log file over time (specifically in 10-minute buckets), assuming the file is formatting like "INFO - [2014-08-27 16:16:29,578] Something something something"
cat /path/to/logfile | grep PATTERN | sed 's/.*\(2014-..-..\) \(..\):\(.\).*/\1 \2:\3x/' | uniq -c
results in: 273 2014-08-27 14:5x
222 2014-08-27 15:0x
201 2014-08-27 15:1x
171 2014-08-27 15:2x
349 2014-08-27 15:3x
230 2014-08-27 15:4x
236 2014-08-27 15:5x
339 2014-08-27 16:0x
330 2014-08-27 16:1x
This can subsequently be visualized with a tool like gnuplot or Excel.