David,

Sorry for the confusion with what I suggested last year.  It's been a
frustrating road for myself as well, since those "older" changes worked for
a while and when I changed my environment they would stop working.

In short, either set of changes may work for you, if the ones I posted
earlier work, keep them.  You basically have 2 choices:

1) Keep the old changes, if they work reliably.

2) Apply the patch, copy the commons-logging.properties file over to your
WEB-INF/classes or write the ant target to do so (u could just replace the
log4j.properties copying target), etc.


A note to the TDK 2.3 builder:  probably a good idea to include these
properties in the TDK...

Bradford A. Folkens
[EMAIL PROTECTED]
 

-----Original Message-----
From: David Wynter [mailto:[EMAIL PROTECTED] 
Sent: Thursday, April 29, 2004 6:28 AM
To: Turbine Users List
Subject: RE: Turbine defaults to SimpleLog

Hey Brad,

So to clarify. We undo the changes to Turbine.java you originally suggested
last year and instead apply the simple change below?

I have found this whole thing a total nightmare and have been unable to work
out how to fix the Turbine code. The fact that the Turbine commiters have
not done anything about it also concerns me.

Thanks,

David

-----Original Message-----
From: Folkens, Brad [mailto:[EMAIL PROTECTED]
Sent: 23 April 2004 16:43
To: 'Turbine Users List'
Subject: Turbine defaults to SimpleLog


To all who are having problems with the default SimpleLog in
commons-logging:

Instead of the hack I mentioned a few months ago (I have since messed around
with this a lot more), the following works more reliably.


1) Make sure you have the latest commons-logging.jar in your /WEB-INF/lib
directory.  (Actually, if you're having the problem in the first place then
you probably <do> have the latest commons-logging.jar)

2) Create a commons-logging.properties file in your /WEB-INF/conf directory
that reads:

org.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger

3) Copy the commons-logging.properties file to your /WEB-INF/classes
directory (this can be put into ant to copy automagically)

(optional 4) Patch the Turbine.java file with the following (this removes
Log deprecation warnings):

Index: Turbine.java
===================================================================
RCS file:
/home/cvspublic/jakarta-turbine-2/src/java/org/apache/turbine/Turbine.java,v
retrieving revision 1.45
diff -u -r1.45 Turbine.java
--- Turbine.java 2 Jul 2003 16:52:24 -0000 1.45
+++ Turbine.java 23 Apr 2004 15:39:35 -0000
@@ -77,7 +77,7 @@

 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.apache.commons.logging.impl.Log4jFactory;
+import org.apache.commons.logging.impl.Log4JLogger;

 import org.apache.log4j.PropertyConfigurator;

@@ -266,8 +266,8 @@
         //
         // Set up Commons Logging to use the Log4J Logging
         //
-        System.getProperties().setProperty(LogFactory.class.getName(),
-                                           Log4jFactory.class.getName());
+        System.getProperties().setProperty(Log.class.getName(),
+                                           
+ Log4JLogger.class.getName());

         // Set the application root. This defaults to the webapp
         // context if not otherwise set. This is to allow 2.1 apps



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

Reply via email to