Re: Continuously write content of log file to NSTextView
Re: Continuously write content of log file to NSTextView
- Subject: Re: Continuously write content of log file to NSTextView
- From: email@hidden
- Date: Fri, 2 Dec 2005 09:44:44 -0600
>
In one of my apps I want to display the content of a text file (a log
>
file) in an NSTextView and continuously update the NSTextView as new
>
lines are added to the file. Basically, it should be something like
>
the Console.app is doing.
>
>
I read about wrapping a "tail -f" command and piping the output of
>
the task into the NSTextView and successfully implemented that, but
>
as I have several log files to display simultaneously it gets a
>
little bit difficult to deal with all those tail tasks...
You shouldn't need separate tasks for each log file. The man page for tail
suggests that you can observe several files at once:
http://developer.apple.com/documentation/Darwin/Reference/ManPages/man1/tail.1.html
See the paragraph just before the DIAGNOSTIC section.
--- Peter
_______________________________________________
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