Re: NSLog to a file?
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.