• 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: Malte Tancred <email@hidden>
  • Date: Fri, 3 May 2002 10:19:33 +0200

On friday, may 3, 2002, at 08:12 , Angela Brett wrote:
So, what would be the best way to go about this? I'm sure it must have been done before. Will I have to change all my ASLog calls or is there a way I can leave them as they are?

My opinion is that this is a sysadmin problem, not a programmer problem, at least when it comes, in your case, a background process.

The easiest way to write the output to a file would be to redirect stderr to that file (I believe stderr is the place NSLogs go).

Make sure the program that starts the background app also redirects the output. Voil`!

This setup makes it easy for a sysadmin to do what they want with the output. For example, redirecting the output to a post-processor of some sort. One such processor could send the output to syslogd, another one could log to file while automatically rotating the log files depending on size, content, whatever.

Cheerio,
Malte
_______________________________________________
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: Re: addSubview \ replaceSubview won't support embedded controls
  • Next by Date: What is the way
  • Previous by thread: Re: NSLog to a file?
  • Next by thread: Re: NSLog to a file?
  • Index(es):
    • Date
    • Thread