• 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 to a file?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSLog to a file?


  • Subject: Re: NSLog to a file?
  • From: Cryx <email@hidden>
  • Date: Fri, 3 May 2002 01:37:16 -0500

On Friday, May 3, 2002, at 01:12 AM, Angela Brett wrote:
My other thought was that maybe if I assigned a FILE * for the log file to stderr, then NSLog would write to that file. I haven't tried that yet, but I'm not sure if it's such a good idea to mix things like fopen() with other Cocoa code, especially after reading the thread abuot special characters in pathnames.

My initial reaction too would be to freopen stderr to your desired log file. The stream functions do not use a shell, so there are no special characters to escape.

I'd be surprised if there wasn't a simple cocoa method to do this though...
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
References: 
 >NSLog to a file? (From: Angela Brett <email@hidden>)

  • Prev by Date: NSLog to a file?
  • Next by Date: Re: addSubview \ replaceSubview won't support embedded controls
  • Previous by thread: NSLog to a file?
  • Next by thread: Re: NSLog to a file?
  • Index(es):
    • Date
    • Thread