> On 7/1/05, Bob Zoller <[EMAIL PROTECTED]> wrote:
> > LoggingManager::log('my message', 5000); // log to the default logger
> > LoggingManager::log('my message', 5000, 'otherns'); // log to the
> otherns logger
>
> This is my gripe with this. I dont want to need to know what loggers
> are configured. I want to log a message and let the loggers (ALL of
> them) do what they want with it, if anything. I dont want to have half
> a dozen calls to the logging manager everywhere I want to log things..
> etc. That's the beauty of the observer pattern, you dont need to think
> about who's watching the events.
Exactly my thoughts, Mike!
> > That seem like it'll handle what you're wanting to do David? The
> > question still remains, do we:
> >
> > LoggingManager::log('my message', 5000, 'otherns');
> >
> > -or-
> >
> > LoggingManager::log(new Message('my message', 5000), 'otherns');
>
> I think though, if this is to be the approach, the 'otherns' would be
> encapsulated in the msg object as well, that way your method signature
> isnt subject to changes in what we are actually passing around. So..
> there is at least one benefit to encapsulating the event. :)
>
> Thinking about in those terms, that seems more appealing now.
>
> -Mike
>
> -1 Direct interaction with logger objs
> +1 Msg Object
I don't think we really need the Message Object... If we do it that way,
tho, we'd pass the object to the loggers, right? That way, everybody could
implement his own custom functionality (so I could have a third parameter
for the CustomMessage constructor that gets the namespace. Cool.)... hmh...
maybe I'm +1 Message Object, too ;)
- David
_______________________________________________
agavi-dev mailing list
[email protected]
http://labworkz.com/cgi-bin/mailman/listinfo/agavi-dev