At 09:55 31.01.2001 +1100, you wrote:
>Hi,
>
>I just tried to send this to Ceki Gülcü <[EMAIL PROTECTED]> but that mailbox
>doesn't exist so I figured I would go via this list ;)

Hi Peter,

[EMAIL PROTECTED] is the only mailbox that I pay for. It's also the only one 
that fails regularly. Sigh.

>----
>At 09:44  30/1/01 +0100, Ceki Gülcü wrote:
> >>* package structure; Appenders are mixed with formaters, renderers and
> >>sometimes not mixed.
> >
> >I don't think there is nothing wrong with that. Some Appenders need a
> >Layout and some don't.
>
>Sorry - what I meant is that they are in the same package where if I was
>doing it I would have it in separate packages. ie have
>
>org.apache.log4j.appenders
>org.apache.log4j.appenders.net
>org.apache.log4j.appenders.gui
>org.apache.log4j.filters
>org.apache.log4j.renderers (which would also hold formatters)

Oh, now I see. That looks like a better structure then the one we have 
currently which is somewhat of a mess. I don't know how critical this is 
though... Changing the package structure would be quite troublesome.


> >>* testing code is in same package as productioon code (ie
> >>StressTestCategory or whatever was in main package along with Category)
> >
> >StressTestCategory needs access to package-protected values in Category.
> >Can you suggest an alternative approach?
>
>Brief look (just sucked down CVS and had look) only revealed Category.name
>was used which has an accessor anyway so you could move the stresstester
>into a package
>
>org.apache.log4j.tests
>
>and use the accessor to get at it.
>
>If there is someother fields that need to be accessed a common approach I
>use is do something like
>
>
>public class StressTester
>{
>   class StressedCategory extends Category { ... }
>
>   StressedCategory cat;
>
>   void myTestFunc()
>   {
>     cat.protected_field = ...;
>   }
>}
>
>or sometimes even better
>
>
>public class StressTesterCat extends Category
>{
>   static void myTestFunc( StressTesterCat cat )
>   {
>     cat.protected_field = ...;
>   }
>}


Er.. that works if the fields in question have protected access not default 
(package) access. Or?

Cheers, Ceki


----
Ceki Gülcü - Independent IT Consultant

av. de Rumine 5            Tel: ++41 21 351 23 15
CH-1005 Lausanne        e-mail: [EMAIL PROTECTED]  or
Switzerland                     [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to