• 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()
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Redirect NSLog()


  • Subject: Re: Redirect NSLog()
  • From: Sherm Pendley <email@hidden>
  • Date: Thu, 24 Mar 2005 11:46:56 -0500

On Mar 24, 2005, at 11:10 AM, Ian was here wrote:

Does anyone know how to redirect NSLog() output? So
far, the output goes into XCode's run log window. I
would like to redirect it to a text file (my own error
log).

Fair warning: This is nothing but an untested hunch.

Have you tried using freopen() to re-open stderr on your log file? Something like this:

	#include <stdio.h>
	freopen("/path/to/file", "a", stderr);

sherm--

Cocoa programming in Perl: http://camelbones.sourceforge.net
Hire me! My resume: http://www.dot-app.org

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


References: 
 >Redirect NSLog() (From: Ian was here <email@hidden>)

  • Prev by Date: Re: Linking against an older version of System frameworks
  • Next by Date: How to develop databases
  • Previous by thread: Redirect NSLog()
  • Next by thread: Re: Redirect NSLog()
  • Index(es):
    • Date
    • Thread