Let's see..  for me personally:

I want to be able to "log" a string, and have that message sent to
various places based upon severity:

  A low priority message might not get logged anywhere.
  Another medium priority message might get sent to a log file on the
filesystem.
  A high priority message might get sent to syslog (which I may be monitoring).
  And if some "critical" level message goes through, I might want to
send that directly to an email destined for my cell phone ;)

I want these messages to have a minimal impact on my code:

  I should be able to log a message with one line of code.
  I should be able to log a message from anywhere in the code - ie
needs the ability to be accessed statically.


I think those are my personal requirement for a log system.  The
current setup satisfies all of that, though as Mike said, there is
quite a bit of YAGNI since we're working with existing Mojavi code...
I'll clear it out before I'm done.

That said, I wouldn't want to "simplify" the design much..  I see that
someone might want to "filter" messages based on Context in their
Logger.. Some people might want more than just a string and a priority
in their Message object.. all of which is possible with the current
setup.

Anyone have different requirements?
--Bob


On 7/7/05, graeme <[EMAIL PROTECTED]> wrote:
>  Can I butt in again...?
>
>  I still feel that we are attacking this from the wrong angle. What is it
> that we want?
>
>  If we can decide upon that then it may turn out that this debate is not
> necessary. In my opinion working from a half finished lump of code is not
> the correct approach. From the Mythical Man Month "Plan to throw one away;
> you will, anyhow." Let's decide upon what we want and rewrite the code to
> give us that functionality.
>
>  graeme.
>
>  Mike Vincent wrote:
>  On 7/6/05, Bob Zoller <[EMAIL PROTECTED]> wrote:
>
>
>  The current names don't bother me... Appenders append, Loggers log..
> the only one I can never remember is Layouts, but I don't know that
> equates to a bad name ;)
>
>  But they dont, do they? The 'Logger' doesnt do anything except manage
> the 'appender' by registering an appender, removing an appender
> (yagni), and telling the appenders to do their thing when a message
> comes in [write()]}. Really, 'Loggers' in the current sense are just
> another LoggerManager, they basicly do the same thing. Only difference
> is that 'Loggers' manage 'Appenders' and 'LoggerManager' manages
> 'Loggers'. How about we call them MiddleManagers? :)
>
> MailAppender doesnt currently do anything, but will it really be
> 'appending' an email? If someone is inclined to make an SMS alerter
> using the logging, will it really be appending SMS messages?
>
> *shrug* If it's just me than I can live with that, but I think it's a
> poor choice of words that dont truly reflect the actions or
> responsibilities of the objects.
>
> -Mike
> _______________________________________________
> agavi-dev mailing list
> [email protected]
> http://labworkz.com/cgi-bin/mailman/listinfo/agavi-dev
>
>
>
>
_______________________________________________
agavi-dev mailing list
[email protected]
http://labworkz.com/cgi-bin/mailman/listinfo/agavi-dev

Reply via email to