here's the general idea: public interface LogProvider { Log createLog(String name); Log createLog(Class clazz); }
These instances would be discovered the first time a log was asked for. After determining which LogProvider to use, it would simply call the createLog method when a new instance was required. Naturally, the LogFactory implementation which would use this, would keep hold of the LogProvider once it was found, and cache the Log instances, much like the existing implementation does. I can send you some example code if you'd like. -----Original Message----- From: Simon Kitching [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 26, 2004 9:42 PM To: Jakarta Commons Developers List Subject: Re: [logging] ServletContextLogger On Thu, 2004-05-27 at 08:22, Inger, Matthew wrote: > PS: I'm also willing to create a new implementation of LogFactory which > will discover the available log implementations at runtime, rather than the > compile time strategy which exists now. I'd be interested in seeing a proposal for this. I cannot think of any mechanism for doing this that has reasonable performance. Regards, Simon --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]