Where does stdout go in an ordinary Cocoa application?
-
Karan, Cem (Civ, ARL/CISD) Where does stdout go in an ordinary Cocoa application? Nov 14 2008, 14:02I'm using a library that has been ported over from Linux that uses fprintf() and a global variable to determine where to dump a bunch of logging information. I don't really have the option of converting all of this to syslog() or NSLog(), and I don't want to waste a bunch of time on this library in any case, but I would like to see what the output is. The problem is that I'm creating an ordinary Cocoa application, not a command line application. So where does the output of fprintf(stdout,ââ¬Â¦) go to in a Cocoa application?
Thanks,
Cem Karan -
On Nov 14, 2008, at 6:02 AM, Karan, Cem (Civ, ARL/CISD) wrote:> So where does the output of fprintf(stdout,â¦) go to in a Cocoa
> application?
If there's no tty attached, I'm pretty sure it goes straight to the
console, just as stderr does. So you can read it by launching
Console.app.
Nick Zitzmann
<http://www.chronosnet.com/> -
Open Console.app. You should see your log messages, mixed in with others...
Or close stdout and reopen to wherever you want. (See fclose & fdup...)
--
Scott Ribe
<scott_ribe...>
http://www.killerbytes.com/
(303) 722-0567 voice -
I like this method the best; there is (potentially) a lot of output, and
this is probably the cleanest method. Thanks!
Thanks,
Cem Karan> -----Original Message-----
> From: Scott Ribe [mailto:<scott_ribe...>]
> Sent: Friday, November 14, 2008 11:23 AM
> To: Karan, Cem (Civ, ARL/CISD); <cocoa-dev...>
> Subject: Re: Where does stdout go in an ordinary Cocoa application?
>
> Open Console.app. You should see your log messages, mixed in
> with others...
>
> Or close stdout and reopen to wherever you want. (See fclose
> & fdup...)
>
> --
> Scott Ribe
> <scott_ribe...>
> http://www.killerbytes.com/
> (303) 722-0567 voice
>
>
>


