• 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: stdout or stderr file path on iPhone?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: stdout or stderr file path on iPhone?


  • Subject: Re: stdout or stderr file path on iPhone?
  • From: Jens Alfke <email@hidden>
  • Date: Tue, 30 Aug 2011 13:30:49 -0700

On Aug 30, 2011, at 11:06 AM, Manfred Schwind wrote:

> is there a file path to the console output - visible in Xcode, e.g. when calling NSLog, I think it's stderr - on the iPhone?
> I tried "/dev/stderr" or "/dev/fd/2" (and several other paths) but they do not work and if I get the directory contents of "/dev" they really don't exist on iOS.

Wow, that is rather weird. You might ask on the darwin-userlevel mailing list here, which is all about that level of stuff.

> Background: I have a third party library (that I am not allowed to change) that logs to a file in Debug mode. I want to see this log output directly in the Xcode console, because transferring log files from the iPhone is too complicated. The library provides an API to set the file path (unfortunately not a file handle or something else).

As a workaround you could run a background thread that opens that log file, waits for its EOF to increase, and then echoes the appended data to stderr. (Basically like ‘tail -n’.)

—Jens_______________________________________________

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

  • Follow-Ups:
    • Re: stdout or stderr file path on iPhone?
      • From: Scott Ribe <email@hidden>
References: 
 >stdout or stderr file path on iPhone? (From: Manfred Schwind <email@hidden>)

  • Prev by Date: Re: Won't Applescript command use defined ivars?
  • Next by Date: Re: stdout or stderr file path on iPhone?
  • Previous by thread: Re: stdout or stderr file path on iPhone?
  • Next by thread: Re: stdout or stderr file path on iPhone?
  • Index(es):
    • Date
    • Thread