Re: Redirect NSLog to stdout?
Re: Redirect NSLog to stdout?
- Subject: Re: Redirect NSLog to stdout?
- From: Kyle Sluder <email@hidden>
- Date: Tue, 29 Jun 2010 07:43:48 -0700
On Tue, Jun 29, 2010 at 7:09 AM, Tito Ciuro <email@hidden> wrote:
> I have written a small app which gets launched when SuperDuper has finished backing up my data. The problem is that since NSLog() writes to stderr, SuperDuper treats this as an error. The advice I've been given is to redirect NSLog() to stdout. One possible solution I can think of is the following:
Really, the Correct Thing(TM) to do would be to file a bug against
SuperDuper. Writing to stderr is not how programs indicate failure;
terminating with a non-zero error code is.
Since that's not going to solve your problem, could you use asl
instead of NSLog? You can add the stdout file descriptor to the list
of locations asl will log your output to.
Either way, you're going to have to stop using NSLog.
--Kyle Sluder
_______________________________________________
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