• 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: Continuously write content of log file to NSTextView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Prev by Date: Re: Is Apple's singleton sample code correct?
  • Next by Date: Re: How to find a window under the cursor
  • Previous by thread: Re: Continuously write content of log file to NSTextView
  • Next by thread: Problems with NSOutlineView
  • Index(es):
    • Date
    • Thread