• 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: NSLog output in Sierra?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSLog output in Sierra?


  • Subject: Re: NSLog output in Sierra?
  • From: Jon Gotow <email@hidden>
  • Date: Wed, 11 Jan 2017 23:04:22 -0700

> On Jan 11, 2017, at 2:08 PM, Carl Hoefs <email@hidden> wrote:
>
> This 2014 Apple TechNote: https://developer.apple.com/library/content/technotes/tn2347/_index.html claims that on macOS NSLog calls issued during app execution are logged in the console log. I can verify that this used to be the case, but now that I'm running Sierra 10.12.2, none of the NSLogs show up in the 'system log'. Where do they go? Where can I see the NSLog output from my background Foundation daemon process?

In the Console, select your machine in the Devices section of the sidebar, then type in the name of the daemon in the search field. Oh, and click on the "Now" button in the toolbar to keep the Console scrolling as new data comes in. Any new NSLog messages should show up in the log window.

I don't believe NSLog messages are committed to the system.log file anymore, so you can't see messages that were logged before you launched Console.app. If you want to see older messages you can dump them using the 'log' command from the command line. Something like:

	log show --info --debug --predicate 'senderImagePath endswith "DAEMON_NAME"'

Yes, it's completely non-intuitive, IMO. Check out the WWDC video on the new logging system at https://developer.apple.com/videos/play/wwdc2016/721/ - it at least explains some scenarios where the new logging system makes sense. The problem is that it's a big change from the old, simple-minded NSLog output that worked fine for many developers and users.

 - Jon
 _______________________________________________
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: NSLog output in Sierra?
      • From: Carl Hoefs <email@hidden>
    • Re: NSLog output in Sierra?
      • From: Alex Zavatone <email@hidden>
References: 
 >NSLog output in Sierra? (From: Carl Hoefs <email@hidden>)

  • Prev by Date: Make a sub project recompile based on if a file that is not in it is dirtied.
  • Next by Date: Re: NSLog output in Sierra?
  • Previous by thread: NSLog output in Sierra?
  • Next by thread: Re: NSLog output in Sierra?
  • Index(es):
    • Date
    • Thread