Emailing launchd logs
We have a number of /Library/LaunchDaemons jobs on our 10.5 xserves, and via the StandardErrPath and StandardOutPath keys in the .plist file we can have the jobs tells what they're doing. What'd be great would be having the logs automatically emailed to us after each run.
Is there a common pattern for doing this?
I thought about writing another launchd job that watched for changes to a /var/log/launchd/ directory, and then mailing the log files and removing them. But it occurs to me it's going to get involved (waiting for the files to stop changing before emailing then, for example) .... so before I look at that, I'd thought I'd check to see if anyone had a better way of solving this kind of problem (clues, suggestions or pointers all much appreciated).
Many thanks
Richard
Is there a common pattern for doing this?
I thought about writing another launchd job that watched for changes to a /var/log/launchd/ directory, and then mailing the log files and removing them. But it occurs to me it's going to get involved (waiting for the files to stop changing before emailing then, for example) .... so before I look at that, I'd thought I'd check to see if anyone had a better way of solving this kind of problem (clues, suggestions or pointers all much appreciated).
Many thanks
Richard
MacBook Pro, Mac OS X (10.5)