Re: stdout or stderr file path on iPhone?
Re: stdout or stderr file path on iPhone?
- Subject: Re: stdout or stderr file path on iPhone?
- From: Manfred Schwind <email@hidden>
- Date: Tue, 30 Aug 2011 23:36:35 +0200
>>> Background: I have a third party library (that I am not allowed to change) that logs to a file in Debug mode. I want to see this log output directly in the Xcode console, because transferring log files from the iPhone is too complicated. The library provides an API to set the file path (unfortunately not a file handle or something else).
>
> Is there any way that could find the file descriptor for that log file, close it, fdup it to 3 (stderr)???
Great, thanx! That works like a charm.
Access to the file descriptor is exposed through some preprocessor macros in the header of the library.
So now I just grab this file descriptor and do a dup2(STDERR_FILENO, fileDescriptor);
Problem solved.
Thank you,
Mani
--
http://mani.de - friendly software
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden