Writing to OS X ~/Library/Logs from your app
Saturday, June 18th, 2011
In your main.m file just amend to look like the following.
1 2 3 4 5 6 7 8 9 10 11 | #import <Cocoa/Cocoa.h> int main(int argc, char *argv[]) { id pool = [NSAutoreleasePool new]; NSString *logPath = [NSHomeDirectory() stringByAppendingPathComponent:@"Library/Logs/Depicus"]; freopen([logPath fileSystemRepresentation], "a", stderr); [pool release]; return NSApplicationMain(argc, (const char **) argv); } |







