>>> 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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to