[erlang-questions] hi ulf! i've seen u already answered some questions related to the gen_event behaviour and its functions. since i'm new to erlang i'd like to ask a question related to that topic and i'm grateful for any reply. currently i'm implementing a logging system using gen_event and the syslog-interface to log additional local facilities to the linux sysklog-daemon. 1.) should my event-manager have a supervised handler for each facility and/or for each severity to enforce concurrency or is it better to have all events handled after one another by only one handler and using clauses to match certain conditions? 2.) when 'notifying' i assume the event-manager propagates the event to all handlers belonging to that manager. shouldn't i use 'call' instead to already specificly adress the certain handler with my request/event in order to avoid passing-around-messages and matching against clauses in each handler and therefore conserve performance? i'm still not very sure which approach makes the most sense, maybe you can give me a hint or two on how this is realized. thanx a lot for your time, gen_event + syslog + sysklogd

Serge Aleynikov <>
Sat Nov 17 04:41:55 CET 2007


You can look at the LAMA contrib at jungerl:
http://jungerl.sourceforge.net
Among other things it includes syslog logging based on error_logger 
event manager.

Serge

Grasl Christoph wrote:
> hi there!
> 
> i've seen some of u already answered some questions related 
> to the gen_event behaviour and its functions. since i'm new 
> to erlang i'd like to ask a question related to that topic 
> and i'm grateful for any reply.
> 
> currently i'm implementing a logging system using gen_event
> and the syslog-interface to log additional local facilities
> to the linux sysklog-daemon.
> 
> 1.)
> should my event-manager have a
> supervised handler for each facility and/or for each severity
> to enforce concurrency or is it better to have all events handled
> after one another by only one handler and using clauses to match
> certain conditions?
> 
> 2.)
> when 'notifying' i assume the event-manager propagates the event to
> all handlers belonging to that manager. shouldn't i use
> 'call' instead to already specificly adress the certain handler with my
> request/event in order to avoid passing-around-messages and matching
> against clauses in each handler and therefore conserve performance?
> 
> i'm still not very sure which approach makes the most sense, maybe
> some of you can give me a hint or two on how this is realized.
> 
> thanx a lot for your time,
> 
> cheers, chris
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> erlang-questions mailing list
> 
> http://www.erlang.org/mailman/listinfo/erlang-questions




More information about the erlang-questions mailing list