My App GrowlsGrowl is a nice notification utility for Mac OS X. There are many applications or plugins avaiable which interact with Growl (e. g. Skype, Mail, VLC etc.).

I thought it would be nice if I could redirect the catalyst debug output to it as well. Log::Dispatch has a nice appender Log::Dispatch::MacGrowl. Load Log::Dispatch as plugin in MyApp.pm (after ConfigLoader):

use Catalyst qw/-Debug
                ConfigLoader
                Log::Dispatch
                Static::Simple/;

and configure your app accordingly:

<Log::Dispatch>
	class     = MacGrowl
	name      = growl
	app_name  = MyAppGrowls
	title     = MyApp
	sticky    = 0
	min_level = notice
	format    = [%p] %m %n
</Log::Dispatch>

I cannot recommend to set min_level to info or below because this will add all start up log statements to be rendered on your screen. Kind of annoying.

Put a log statement anywhere in your code and start up your dev server. A growl notification should appear when you hit the log statement.

You can get a sample application MyAppGrowls from GitHub.

Make sure you have the following modules installed (or run perl Makefile.PL):

  • Catalyst::Plugin::Log::Dispatch
  • Log::Dispatch::Config
  • Log::Dispatch::MacGrowl