Hi,

When implementing the new logging system I discovered a serious design
problem:

There are different formats of messages sent to the broker:

1) Log-Messages, having a format containing the log-level

2) State-Messages, (e.g. "SERVICE ALLERT") which do not contain a levelname.

The current implementation does not differentiate both kinds of messages
-- but they are quite different: State-Messages are essential, while
log-messages could be ignored without (AFAIK) any impact to the function.

Both types of messages are send as Broks to the broker.

I propose the following change:

No longer use the logging module for sending state-messages to the
receiver. Instead add a minimal "state-sender" doing this.

Now the question is: Should state-messages be logged on the sender side
(the scheduler)? If so, we need to trick the logger, as it send all logs
to the broker, too, so each state-change would be send twice.

IMHO we do not need to log state-messages at the scheduler only with
level "DEBUG" which is not send to the broker. State-messages are not
interesting at the scheduler side except for debugging.

What do you think?

-- 
Regards
Hartmut Goebel

| Hartmut Goebel          | h.goe...@crazy-compilers.com               |
| www.crazy-compilers.com | compilers which you thought are impossible |


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Shinken-devel mailing list
Shinken-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/shinken-devel

Reply via email to