← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 18977: Data approval level service, removed logging which had expensive/duplicate method calls

 

------------------------------------------------------------
revno: 18977
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2015-04-22 11:19:36 +0200
message:
  Data approval level service, removed logging which had expensive/duplicate method calls
modified:
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataapproval/DefaultDataApprovalLevelService.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/dataapproval/DefaultDataApprovalLevelService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataapproval/DefaultDataApprovalLevelService.java	2015-04-17 14:36:52 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataapproval/DefaultDataApprovalLevelService.java	2015-04-22 09:19:36 +0000
@@ -158,13 +158,11 @@
 
         int levelAboveOrgUnitLevel = 0;
 
-        tracePrint( "getHighestDataApprovalLevel - data approval level count: " + getAllDataApprovalLevels().size() );
-
         List<DataApprovalLevel> userApprovalLevels = getUserDataApprovalLevels();
         
         for ( DataApprovalLevel level : userApprovalLevels )
         {
-            tracePrint( "getHighestDataApprovalLevel - data approval level: " + level.getName() );
+            log.debug( "Get highest data approval level: " + level.getName() );
 
             if ( level.getOrgUnitLevel() == orgUnitLevel )
             {
@@ -587,11 +585,6 @@
     // Supportive methods
     // -------------------------------------------------------------------------
 
-    private void tracePrint( String s ) // Temporary, for development
-    {
-        log.trace( s );
-    }
-
     /**
      * Swaps a data approval level with the next higher level.
      *
@@ -718,11 +711,6 @@
 
         for ( DataApprovalLevel level : getAllDataApprovalLevels() )
         {
-            tracePrint("userApprovalLevel( " + orgUnit.getName() + "-" + orgUnitLevel + " ) approval level "
-                + level.getName() + " " + securityService.canRead( level )
-                + " COGS " + ( level.getCategoryOptionGroupSet() == null ? "(null)" : level.getCategoryOptionGroupSet().getName() )
-                + " canReadCOGS " + canReadCOGS( user, level.getCategoryOptionGroupSet() ) );
-
             if ( level.getOrgUnitLevel() >= orgUnitLevel
                 && securityService.canRead( level )
                 && canReadCOGS( user, level.getCategoryOptionGroupSet() ) )