Incrementally consuming the eventlog

Johan Tibell johan.tibell at
Sun May 1 10:39:43 CEST 2011

On Thu, Apr 28, 2011 at 11:53 PM, Donnie Jones <donnie at> wrote:
> Anyway, from your description, I don't understand how a listener would
> consume the eventlog incrementally?

I simply meant that I want to be able to register listeners for events
instead of having to parse the eventlog file after the fact.

> I do think it would be useful to register listeners for events.  I do
> not think the invocation of a callback would be too much overhead,
> rather the action the callback performs could be a very significant
> overhead, such as sending eventlog data over a network connection.
> But, if you are willing to accept the performance loss from the
> callback's action to gain the event data then it seems worthwhile to
> me.

A typical use of the callback would be to update some internal data
structure of the program itself, thereby making the program
self-monitoring. I've been toying with introducing log levels to the
eventlog command line API so the consumer of the event log can specify
the number of events it would like to receive. We could do something
similar for the API e.g.

registerEventListener (schedEvents .|. ioManagerEvents) (\ e -> ...)


More information about the Glasgow-haskell-users mailing list