Re: Struts 1/2 and Logging

2007-07-08 Thread Rene Gielen
Very interesting article, indeed. Both WW and S2 use static loggers, as it was always considered best practice... On the other hand, the problem only applies if a shared classloader is used, and I can hardly imagine a setup where struts jars are deployed eg. in $CATALINA/commons/lib rather

Re: Struts 1/2 and Logging

2007-07-08 Thread Frank W. Zammetti
How about Struts JARs at the EAR level? Wouldn't that be loaded (by default anyway) by a higher-level classloader than individual apps and shared across all WARs in the EAR? Not sure that's quite the same thing though (and I'm basing this on Websphere, which as we all know has some of the

Re: Struts 1/2 and Logging

2007-07-08 Thread Wes Wannemacher
I tend to deploy S2 in commons/lib only because I use S2 in all of my web-apps. It saves space and keeps WEB-INF/lib a little more organized. Not that I wouldn't change, it's just the way I've done it. -Wes On 7/8/07, Rene Gielen [EMAIL PROTECTED] wrote: Very interesting article, indeed. Both

Re: Struts 1/2 and Logging

2007-07-08 Thread Martin Cooper
On 7/8/07, Rene Gielen [EMAIL PROTECTED] wrote: Very interesting article, indeed. Both WW and S2 use static loggers, as it was always considered best practice... On the other hand, the problem only applies if a shared classloader is used, and I can hardly imagine a setup where struts jars are

Re: Struts 1/2 and Logging

2007-07-08 Thread Martin Cooper
On 7/8/07, Frank W. Zammetti [EMAIL PROTECTED] wrote: How about Struts JARs at the EAR level? Wouldn't that be loaded (by default anyway) by a higher-level classloader than individual apps and shared across all WARs in the EAR? Not sure that's quite the same thing though (and I'm basing this

Re: Struts 1/2 and Logging

2007-07-08 Thread Frank W. Zammetti
Martin Cooper wrote: It would be the same thing in the sense of the direction of the class loader, and I would expect the same screwy things to happen. And if you're using WebFear, then I'd fully expect other screwy things to happen as well, as a free bonus. ;-) Hehe, I know *exactly* what you

Re: Struts 1/2 and Logging

2007-07-08 Thread Paul Benedict
I use WAS 6.0 at work and it took me 3 full days to figure out how to get log4j working with it. Ugh. Yes, the software is an elephant. Anyway, despite the fact that Struts 1 supports only static logging, I believe this position could be evaluated. Correct me when wrong, but the article

Re: Struts 1/2 and Logging

2007-07-08 Thread Frank W. Zammetti
FWIW, my opinion would be go ahead and change it... unless someone can show where it would cause trouble, I'm in the better safe than sorry camp. I know of a number of instances where I've seen Struts installed in a shared way, either at EAR-level or something like Tomcat's shared libs

Re: Struts 1/2 and Logging

2007-07-08 Thread Paul Benedict
It doesn't have to be an all or nothing game either. Obviously, even in a shared library, instance loggers are not always appropriate. So it's definitely on a class by class basis. Frank W. Zammetti wrote: FWIW, my opinion would be go ahead and change it... unless someone can show where it

Re: Struts 1/2 and Logging

2007-07-08 Thread Tom Schneider
So what determines what should be an instance logger and what should be a static logger? From the original article, they recommend creating the loggers as needed when logging in a static context. To me, that implies only instance level loggers are allowed globally to a class. In static

Struts 1/2 and Logging

2007-07-06 Thread Paul Benedict
Has anyone ever read this? http://wiki.apache.org/jakarta-commons/Logging/StaticLog Please correct me when I am wrong, but the recommendations say that shared libraries should not be using a static logger because it causes problems with application classloaders. Most of the S1 code uses static

Re: Struts 1/2 and Logging

2007-07-06 Thread Wendy Smoak
On 7/6/07, Paul Benedict [EMAIL PROTECTED] wrote: Has anyone ever read this? http://wiki.apache.org/jakarta-commons/Logging/StaticLog Did you check the archives? Simon mentioned it well over a year ago, with no replies: