• 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: Where does printf go?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Where does printf go?


  • Subject: Re: Where does printf go?
  • From: Seth Willits <email@hidden>
  • Date: Tue, 28 Oct 2014 10:55:20 -0700

On Oct 28, 2014, at 9:49 AM, Jens Alfke <email@hidden> wrote:

On Oct 28, 2014, at 3:13 AM, Jonathan Taylor <email@hidden> wrote:

If Xcode is running, printf goes to the Xcode console. If my program is launched from the OS X console, printf will go there. My memory is that if neither of these conditions are met then the output will go to the Console Log as per NSLog. That doesn't seem to be the case any more. 

stderr gets logged to ASL and can be displayed in Console.app. I don't think stdout ever went anywhere in particular in an app launched via the GUI … it's always just been dropped on the floor.

stdout used to go to the system log as well, but it stopped doing so in .... Liiiiooonnn?? I think. The change made NSLog() useless for reporting errors if you ever want to see those errors in your users' logs to diagnose problems.

My current solution is to use my own logging function (with levels) which wraps ASL, as well as enables writing to a file on the desktop when turned on by the user, so it's easy to pass along in emails. More annoying than it should be!


--
Seth Willits



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Where does printf go?
      • From: Jens Alfke <email@hidden>
References: 
 >Where does printf go? (From: Jonathan Taylor <email@hidden>)
 >Re: Where does printf go? (From: Jens Alfke <email@hidden>)

  • Prev by Date: Re: Where does printf go?
  • Next by Date: Re: Where does printf go?
  • Previous by thread: Re: Where does printf go?
  • Next by thread: Re: Where does printf go?
  • Index(es):
    • Date
    • Thread