← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 1549: Improved logging of errors

 

------------------------------------------------------------
revno: 1549
committer: Lars Helge Oeverland <larshelge@xxxxxxxxx>
branch nick: trunk
timestamp: Thu 2010-03-04 13:22:49 +0100
message:
  Improved logging of errors
modified:
  dhis-2/dhis-services/dhis-service-importexport/src/main/resources/sqlmap/groupSet.sqlmap.xml
  dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/process/AbstractStatementInternalProcess.java
  dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/DebugUtils.java
  dhis-2/dhis-web/dhis-web-portal/pom.xml


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription.
=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/resources/sqlmap/groupSet.sqlmap.xml'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/resources/sqlmap/groupSet.sqlmap.xml	2009-03-03 16:46:36 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/resources/sqlmap/groupSet.sqlmap.xml	2010-03-04 12:22:49 +0000
@@ -18,7 +18,6 @@
 		<result property="name" column="OrgUnitGroupSetName"/>
 		<result property="description" column="OrgUnitGroupSetDescription"/>
 		<result property="compulsory" column="OrgUnitGroupSetCompulsory" typeHandler="booleanTypeHandler"/>
-		<result property="exclusive" column="OrgUnitGroupSetExclusive" typeHandler="booleanTypeHandler"/>
 	</resultMap>
 	
 	<!-- Statement -->

=== modified file 'dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/process/AbstractStatementInternalProcess.java'
--- dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/process/AbstractStatementInternalProcess.java	2010-03-04 11:55:58 +0000
+++ dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/process/AbstractStatementInternalProcess.java	2010-03-04 12:22:49 +0000
@@ -31,6 +31,7 @@
 import org.amplecode.quick.StatementManager;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+import org.hisp.dhis.system.util.DebugUtils;
 
 /**
  * @author Lars Helge Overland
@@ -87,6 +88,7 @@
             getState().setMessage( getErrorMessage() );
             
             log.error( ex );
+            log.error( DebugUtils.getStackTrace( ex ) );
             
             ex.printStackTrace();
         }

=== modified file 'dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/DebugUtils.java'
--- dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/DebugUtils.java	2009-03-03 16:46:36 +0000
+++ dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/DebugUtils.java	2010-03-04 12:22:49 +0000
@@ -27,6 +27,8 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+import java.io.PrintWriter;
+import java.io.StringWriter;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
@@ -130,4 +132,15 @@
         
         return false;
     }
+
+    public static String getStackTrace( Throwable t )
+    {
+        StringWriter sw = new StringWriter();
+        PrintWriter pw = new PrintWriter( sw, true );
+        t.printStackTrace( pw );
+        pw.flush();
+        sw.flush();
+        
+        return sw.toString();
+    }
 }

=== modified file 'dhis-2/dhis-web/dhis-web-portal/pom.xml'
--- dhis-2/dhis-web/dhis-web-portal/pom.xml	2010-03-04 12:00:19 +0000
+++ dhis-2/dhis-web/dhis-web-portal/pom.xml	2010-03-04 12:22:49 +0000
@@ -102,7 +102,6 @@
       <version>${version}</version>
       <type>war</type>
     </dependency>
-	<!--
     <dependency>
       <groupId>org.hisp.dhis</groupId>
       <artifactId>dhis-web-reporting</artifactId>
@@ -127,7 +126,6 @@
       <version>${version}</version>
       <type>war</type>
     </dependency>
-	-->
 	<dependency>
       <groupId>org.hisp.dhis</groupId>
       <artifactId>dhis-web-caseentry</artifactId>
@@ -151,16 +149,12 @@
       <version>${version}</version>
       <type>war</type>
     </dependency>
-	
-	
     <dependency>
       <groupId>org.hisp.dhis</groupId>
       <artifactId>dhis-web-reports-national</artifactId>
       <version>${version}</version>
       <type>war</type>
     </dependency>
-	-->
-<!--	
     <dependency>
       <groupId>org.hisp.dhis</groupId>
       <artifactId>dhis-web-validationrule-local-in</artifactId>