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 ;)
----
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)
>>* 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 = ...;
}
}
>>* build process uses nested ant build.xml files (yuck! ;-]).
>
>I don't think log4j uses nested build files or not really and not
>anymore... :-)
I probably was looking at an old version when I saw this ;)
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]