Hi All,
My main app is comprised of half OBJc and applescript classes. I have some complex logging needs and am trying CocoaLumberjack which is great.
The trick is calling it from the applescript classes.
In OBJc class:
#import "DDLog.h"
//then later for log calls
DDLogError(@"some message %@",someVar);
I made a bridge function in my utility OBJc class
+(void)setLoggerTxt:(NSString*) intxt var:(NSString*) invar {
DDLogError(intxt, invar);
}
and call it from applescript
on logInfo_var_(intext,inVar)
tell current application's UtilsPlus to setLoggerTxt_var_(intext,inVar)
end logInfo_var_
Would it be in any way possible to call these DDLogErrors from the applescript itself. That way it would show the correct line numbers logged in the applescript class. Now it always shows the line number for the OBJc class that sends the DDLogError line. I don’t know if it is possible to import the needed #import "DDLog.h or even call something like DDLogError(@“some message %@”,someVar).
Thanks!
Rob