I have been using a global define for NSLog so I can turn debug logging on and off in one place. I put it in the prefix file usually if there is logging across many class files. Is there any way to do this with ASOC script files, and the regular log command, for instance. I know I can create a log handler with an on/off script property for a particular file but it would be nice to have a central “switch.” I’ve been messing around with this but can’t get anywhere. I guess it’s the old global property question.
#define LOG_TEXT( a ) NSLog( a )
#define LOG_TEXT( a ) // (a)
if aBoolean then
and then I have a global boolean that is “aBoolean” and if true, it logs, if false it won’t. But then no commenting of code needs to happen anywhere, and I can put as many statements in my code. I set up a menu item to set aBoolean to true or false.