More on a replacement for the console
More on a replacement for the console
- Subject: More on a replacement for the console
- From: Alex Zavatone <email@hidden>
- Date: Mon, 26 Mar 2012 13:48:51 -0400
To get one simple console replacement log window that I can see any time and is not affected whatsoever by Xcode, I am currently using this working solution:
- (void)redirectNSLogToDocumentFolder{
NSString *documentsDirectory = @"/Users/zav";
NSString *fileName =[NSString stringWithFormat:@"iPhone Simulator log.txt"];
NSString *logFilePath = [documentsDirectory stringByAppendingPathComponent:fileName];
freopen([logFilePath cStringUsingEncoding:NSASCIIStringEncoding],"a+",stderr);
}
I'm calling it on application didFinishLaunchingWithOptions like so:
[self redirectNSLogToDocumentFolder ];
This writes to a file at the root of my user folder on my HD only when I am using the simulator. For now, this is good enough.
The file: ~\iPhone Simulator log.txt
While I'm still looking to get the Terminal (or a terminal replacement) to display proportional fonts with proportional spacing, I'm simply using this to display my log file.
tail -f 'iPhone Simulator log.txt'
The log file gets deleted at the end of each day, whether I want it to or not.
All the output I want without having to worry about when/if Xcode is going to do something odd to my GUI or widow placement.
- Alex Zavatone
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden