I have a shell script that logs messages to syslog using the 'logger' command. In my syslog.conf, I filter those messages to a specific log file. This is a portable solution that works across all unices. On OS X, I would also like to have these messages sent to growl. I have tried both of the following with no success:
*.* |exec /usr/local/bin/growlnotify
*.* @127.0.0.1:23052
Best Answer
According to
man syslog.conf
, Mac OS X'ssyslog.conf
can handle messages only by writing to a file, sending to a remote host's syslog, and send them to users' consoles.Your best option is probably to send to a file, and write a daemon or a periodically running script that consumes this file and calls
growlnotify
with what it reads from the file, something like the following:Either keep this running all the time by wrapping in a loop, or start it every few seconds using a
launchd
job and theStartInterval
directive.man launchd
andman launchd.plist
can help you here.