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.

> 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
_______________________________________________
agavi-dev mailing list
[email protected]
http://labworkz.com/cgi-bin/mailman/listinfo/agavi-dev

Reply via email to