@cfry The simple hack to make this work on both in linux and OSX.
logger4.pd
Not completely sure the output of uname
on OSX will be Darwin, if it does not work open up a terminal and run uname
, what ever the output is is what you want to be the symbol in the [route]. And make sure to fix that path. You can also shorten that [del 1000], should be able to be dropped to at least 100.
The one fault with this is that killall tee
is not great, it is possible there could be some other instance of tee running somewhere else and killall does kill all within the users permissions. OSX's paranoia might save you here, pd may not be able to kill apps which it did not start, depends on how they set things up. It is fairly safe as long as you do run pd as root and do not start any scripts running before sending that bang. Personally I would not worry about it until it bit me, I abuse killall to save having to get pids and it has only bitten me a few times in 20 years and never on something as innocuous as tee. If you are feeling paranoid or curious you can run tee in a terminal and then bang that right inlet to see if it kills the instance running in the terminal. We can make this safe with a few more [command]s if you want, need to rework a command like ps -f | grep "tee -a <log file name>"
into playing well with [command], grab the pid and then run kill on that pid,