← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 15518: Improved logging in module manager

 

------------------------------------------------------------
revno: 15518
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2014-06-02 15:32:03 +0200
message:
  Improved logging in module manager
modified:
  dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/webportal/module/DefaultModuleManager.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-web/dhis-web-commons/src/main/java/org/hisp/dhis/webportal/module/DefaultModuleManager.java'
--- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/webportal/module/DefaultModuleManager.java	2014-05-26 10:55:47 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/webportal/module/DefaultModuleManager.java	2014-06-02 13:32:03 +0000
@@ -54,7 +54,7 @@
 public class DefaultModuleManager
     implements ModuleManager
 {
-    private static final Log LOG = LogFactory.getLog( DefaultModuleManager.class );
+    private static final Log log = LogFactory.getLog( DefaultModuleManager.class );
 
     private boolean modulesDetected = false;
 
@@ -174,13 +174,15 @@
         }
 
         for ( PackageConfig packageConfig : getPackageConfigs() )
-        {
+        {            
             String name = packageConfig.getName();
             String namespace = packageConfig.getNamespace();
 
+            log.debug( "Package config: " + name + ", " + namespace );
+            
             if ( packageConfig.getAllActionConfigs().size() == 0 )
             {
-                LOG.debug( "Ignoring action package with no actions: " + name );
+                log.warn( "Ignoring action package with no actions: " + name );
 
                 continue;
             }
@@ -199,8 +201,8 @@
             {
                 Module module = modulesByNamespace.get( namespace );
 
-                throw new RuntimeException( "These action packages have the same namespace: " + name + " and "
-                    + module.getName() );
+                throw new RuntimeException( "These action packages have the same namespace: " + 
+                    name + " and " + module.getName() );
             }
 
             Module module = new Module( name, namespace );
@@ -213,16 +215,18 @@
 
                 menuModules.add( module );
 
-                LOG.debug( "Has default action: " + name );
+                log.debug( "Has default action: " + name );
             }
             else
             {
-                LOG.debug( "Doesn't have default action: " + name );
+                log.debug( "Doesn't have default action: " + name );
             }
         }
 
         Collections.sort( menuModules, moduleComparator );
 
+        log.info( "Menu modules detected: " + menuModules );
+        
         modulesDetected = true;
     }