[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Custom log file
From: |
Christian Hopp |
Subject: |
Re: Custom log file |
Date: |
Thu, 2 Jun 2005 10:05:51 +0200 (CEST) |
On Thu, 2 Jun 2005, Jan-Henrik Haukeland wrote:
Well, I agree with you, hauk. We should not work around our own
infrastructure in monit. We could provide the patch as a contrib patch
and use the implementation as an inspiration for our own code.
As far as we got now with the event engine, we should think about
organizing it as we did it for the protocols. Thus, we make it easy to
seamlessly integrate custom event code.
=> -1 for including the patch as it is right now
=> put the patch in contrib
Just my 2 cent,
Christian
Thanks, for the patch[1] I think we can and will use code from this, but not
accept the patch as is[2]. The code looks good but IHMO the main problem with
the patch is that it is designed as an add-on and does not integrate well
with either logging and the event handling mechanism already in monit.
Instead it implements it's own module where logging and "events" are tightly
coupled into one separate unit. In fact the code is so standalone that you
could probably take it and add it to any program without to much trouble :)
This is of course not necessarily a bad thing by all means. However, I feel
that if we should incorporate the patch directly we will bind us up into a
design that is not as flexible as we would want to have.
What we need is a clean separation between the event handling mechanism and
logging. The way I see it, event handling should be clearly decoupled from
any output channel, such as logging. That way, it is much easier to provide
an "event manager" that can delegate (see the delegation design-pattern)
output to different output handlers. Such as sending an email, send a snmp
trap, or log a message in a log file.
As I said, your code is fine and if you allow us to use parts of the code
especially for the log format it would be appreciated. I would also certainly
like to thank you for providing this patch and for using time and energy on
the work. If the patch works for you and your company it's great, that's what
open source is. You take the code and tweak it to solve a particular problem
and if others can use it is a nice side-effect.
[1] It's not a patch but a copy of the CVS, the best thing is to provide
changes as a real patch. For instance by using, [cvs diff -u]
[2] I speak for myself and other commiters in the project may very well have
a different opinion. In that case we will vote.
--
Christian Hopp email: address@hidden
Institut für Elektrische Informationstechnik fon: +49-5323-72-2113
TU Clausthal, Leibnizstr. 28, 38678 Clausthal-Zellerf. fax: +49-5323-72-3197
pgpkey: https://www.iei.tu-clausthal.de/pgp-keys/