Effectively fetching console messages

2008-11-28 Thread Luke the Hiesterman
[Resending to this this. Sorry for anybody who is reading it twice]. I have an app that wants to continually fetch console messages, much like the Console app itself. The problem I'm having is that the act of performing and asl_search every second, or even every 5 seconds makes syslogd go

Re: Effectively fetching console messages

2008-11-28 Thread Martin Stoufer
Couldn't you open a StreamReader object to the file itself (or perhaps from the out end of an NSTask that has the filtering already in place)? I'm thinking some type of grep with the appropriate expression. This task could be left open and simply keep reading in a worker thread in your app. If

Re: Effectively fetching console messages

2008-11-28 Thread Luke the Hiesterman
One problem with reading the file directly is that system.log is owned by root:admin with no read permission granted to other users. Ideally, I wouldn't want my app to require special privilege elevation to run on a standard user's account. Luke On Nov 28, 2008, at 9:48 AM, Martin