← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 12831: Logging

 

------------------------------------------------------------
revno: 12831
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2013-10-30 12:24:24 +0100
message:
  Logging
modified:
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/validation/DefaultValidationRuleService.java


--
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-core/src/main/java/org/hisp/dhis/validation/DefaultValidationRuleService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/validation/DefaultValidationRuleService.java	2013-10-23 22:02:51 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/validation/DefaultValidationRuleService.java	2013-10-30 11:24:24 +0000
@@ -171,7 +171,8 @@
     @Override
     public Collection<ValidationResult> validate( Date startDate, Date endDate, Collection<OrganisationUnit> sources )
     {
-        log.info( "Validate startDate=" + startDate + " endDate=" + endDate + " sources[" + sources.size() + "]" );
+        log.info( "Validate start: " + startDate + " end: " + endDate + " sources: " + sources.size() );
+        
         Collection<Period> periods = periodService.getPeriodsBetweenDates( startDate, endDate );
         Collection<ValidationRule> rules = getAllValidationRules();
         
@@ -183,7 +184,8 @@
     public Collection<ValidationResult> validate( Date startDate, Date endDate, Collection<OrganisationUnit> sources,
         ValidationRuleGroup group )
     {
-    	log.info( "Validate startDate=" + startDate + " endDate=" + endDate + " sources[" + sources.size() + "] group=" + group.getName() );
+    	log.info( "Validate start:" + startDate + " end: " + endDate + " sources: " + sources.size() + " group: " + group.getName() );
+    	
         Collection<Period> periods = periodService.getPeriodsBetweenDates( startDate, endDate );
         Collection<ValidationRule> rules = group.getMembers();
         
@@ -194,7 +196,8 @@
     @Override
     public Collection<ValidationResult> validate( Date startDate, Date endDate, OrganisationUnit source )
     {
-    	log.info( "Validate startDate=" + startDate + " endDate=" + endDate + " source=" + source.getName() );
+    	log.info( "Validate start: " + startDate + " end: " + endDate + " source: " + source.getName() );
+    	
         Collection<Period> periods = periodService.getPeriodsBetweenDates( startDate, endDate );
         Collection<ValidationRule> rules = getAllValidationRules();
         Collection<OrganisationUnit> sources = new HashSet<OrganisationUnit>();
@@ -207,8 +210,9 @@
     @Override
     public Collection<ValidationResult> validate( DataSet dataSet, Period period, OrganisationUnit source )
     {
-    	log.info( "Validate dataSet=" + dataSet.getName() + " period=[" + period.getPeriodType().getName() + " "
-            + period.getStartDate() + " " + period.getEndDate() + "]" + " source=" + source.getName() );
+    	log.info( "Validate data set: " + dataSet.getName() + " period: " + period.getPeriodType().getName() + " "
+            + period.getStartDate() + " " + period.getEndDate() + " source: " + source.getName() );
+    	
         Collection<Period> periods = new ArrayList<Period>();
         periods.add( period );
 
@@ -222,6 +226,8 @@
         {
             rules = getValidationTypeRulesForDataElements( dataSet.getDataElements() );
         }
+        
+        log.info( "Using validation rules: " + rules.size() );
 
         Collection<OrganisationUnit> sources = new HashSet<OrganisationUnit>();
         sources.add( source );