Using Growl to tail a log file

Mikey_p from the Portland Drupal Group pointed me towards a blog post he'd done on using Growl to watch for PHP errors. Always looking to put my fingerprints on something I decided to do the same but using PHP rather than Python.

The short version is install growlnotify then run the following from the terminal:

tail -n 0 -f ~/Sites/nm/logs/access_log | php -r 'while ($m = fgets(STDIN)) shell_exec("growlnotify -p 0 AlertTitle -m ". escapeshellarg($m));'
Obviously you'll need to use the right filename and change AlertTitle to something more to your liking.