On Sat, 11 Aug 2001, Peter Donald wrote:
> On Sat, 11 Aug 2001 20:16, giacomo wrote:
> > > interface TargetFactory
> > > {
> > > LogTarget createTarget( Configuration configuration );
> > > }
> >
> > You're right. As I've mentioned above with "full Selector/Component
> > specification" it clearly should be:
> >
> > interface TargetFactory /* extends Configurable */
> > {
> > LogTarget createTarget();
> > }
> >
> > Concrete Factories will implement Configurable like normal Components
> > will do.
>
> I think I would prefer the Configuration to be passed in. That way each
> factory could be a fly-weight - ie only one instance ever created. That way
> even if we have 20 different file log targets we will still only have one
> FileTargetFactory etc. Thoughts?
Ok.
Another think I need to know:
A Logger is defined by its Category, Targets and Priority. These three
things cannot be changed for a given Logger, right? Well, I know that
there are methods to change the Targets as well as the Priority for a given Category
but it makes no sense IIRC to have two Components which will have the
same Logger which differ in one of the aspects mentioned above
(Category, Target, Priority).
Please confirm.
Giacomo
BTW: After browsing through the code for several month now (mainly
logkit and framework/excalibur) I have the feeling that specifying
everything possible as final (classes, member variables, method
arguments, local variables, and even catched exceptions) is good
programming practice, is it?
>
> Cheers,
>
> Pete
>
> *-----------------------------------------------------*
> | "Faced with the choice between changing one's mind, |
> | and proving that there is no need to do so - almost |
> | everyone gets busy on the proof." |
> | - John Kenneth Galbraith |
> *-----------------------------------------------------*
>
> ---------------------------------------------------------------------
> 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]