Re: Where does printf go?
Re: Where does printf go?
- Subject: Re: Where does printf go?
- From: Alexander von Below <email@hidden>
- Date: Tue, 28 Oct 2014 13:52:17 +0100
Hello,
I have not tried it out in code, but generally, printf goes to "standard out" STDOUT_FILENO (whereas NSLog goes to STDERR_FILENO)
You can redirect all of your output into a file, for example:
- (void) redirectSTDOUT {
NSError *error;
self.fileHandle = [NSFileHandle fileHandleForWritingToURL:self.tmpFileURL error:&error];
self.fileDescriptor = [self.fileHandle fileDescriptor];
dup2(self.fileDescriptor, STDOUT_FILENO);
}
Now, all of your stdout code will go to into a file.
While this does not exactly answer your question, maybe it helps
Alex
Am 28.10.2014 um 11:13 schrieb Jonathan Taylor <email@hidden>:
> This email sent to email@hidden
_______________________________________________
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