Re: Redirect the output of a *NIX log file
Re: Redirect the output of a *NIX log file
- Subject: Re: Redirect the output of a *NIX log file
- From: "Erik M. Buck" <email@hidden>
- Date: Wed, 8 May 2002 15:38:34 -0500
Use popen or NSFileHandle with a pipe and grab the output from 'tail -f
/var/log/messages/error.log'. Reads on the pipe will block until data is
available. Read all available data and append it to a scrolling text view.
----- Original Message -----
From: "Martin Kautz" <email@hidden>
To: <email@hidden>
Sent: Wednesday, May 08, 2002 3:16 PM
Subject: Redirect the output of a *NIX log file
>
Hello programmers,
>
>
this might be a little of topic, indeed... :-)
>
I'm currently developing a web application using PHP. Since my app is
using
>
a lot of cookie and header manipulation stuff, I can't output my debug
>
messages inside HTML. People involved in HTTP are knowing what I mean.
>
Therefore I write my debug messages to /var/log/httpd/error_log to avoid
>
that "Output already done. Header can't be sent..." stuff.
>
That's why I'm using a window of Terminal.app with 'tail -fn10
>
/var/log/messages/error.log' to view my debug messages.
>
Well, I just wanted to know how to write a cocoa app which is polling the
>
error.log and showing the last few lines in a window...
>
I'm basicly looking for a more fashionable way to get my debug messages -
no
>
big deal, huh?
>
>
So I want to get inspired how to access these log messages. I need a
>
starting point or... Maybe someone already knows such an application...
>
>
Thanks in advance,
>
Martin
>
_______________________________________________
>
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.
_______________________________________________
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.