• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Redirect NSLog to stdout?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >Redirect NSLog to stdout? (From: Tito Ciuro <email@hidden>)

  • Prev by Date: Re: Redirect NSLog to stdout?
  • Next by Date: iPhone simple 'cartoon' animation
  • Previous by thread: Re: Redirect NSLog to stdout?
  • Next by thread: Re: Redirect NSLog to stdout?
  • Index(es):
    • Date
    • Thread