Question

Essentially I want to send my phone a pushover alert when a growl happens.

To do this I am hoping to have a hook for when a growl is fired or failing that a log file I can just scan on a cron job. Then I can use either of those to send the pushover alert.

Does growl 1.2.2 have the ability to offer a hook or log it's growls?

Was it helpful?

Solution

Yes, and the answer appears many places with, often the same error(*) copied. I just set it up myself, so here:

Decide where you want your log file. Examples all indicate it must exist first, though I did not verify...

growlog="$HOME/Library/Logs/Growl.log"
touch  "$growlog"

check existing growl settings, before modifying:

defaults read com.Growl.GrowlHelperApp 

These are the magic settings:

defaults write com.Growl.GrowlHelperApp "Custom log history 1" "$growlog"
defaults write com.Growl.GrowlHelperApp GrowlLogType 1 
defaults write com.Growl.GrowlHelperApp GrowlLoggingEnabled -bool YES

go to the growl 'paw' in the menu line and 'restart' -- after this I saw a line in the file. Test with a command such as this from the command line:

growlnotify -t programName -p normal -m 'message....'

Besides normal notifications, growlnotify can be useful in a script to alert the user to do something, with the 'wait' and 'sticky' flags it will wait till you click it to go away:

growlnotify -w -s -m 'tests have finished running; click this to run again'
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top