details:   https://code.openbravo.com/erp/devel/pi/rev/b20ad2172fce
changeset: 22780:b20ad2172fce
user:      Stefan Hühner <stefan.huehner <at> openbravo.com>
date:      Thu Mar 27 12:10:34 2014 +0100
summary:   Fixed 26102: Reduce excessive log-messages from GlobalMenu.java
- Reduce from info to debug:
  - Invalidating menu cache
  - Generating menu took:
- Fix elapsed time calculation from debug message:
  - Getting a copy of globally cached menu took...

diffstat:

 
modules/org.openbravo.client.application/src/org/openbravo/client/application/GlobalMenu.java
 |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (30 lines):

diff -r 5fa0d14ad3d4 -r b20ad2172fce 
modules/org.openbravo.client.application/src/org/openbravo/client/application/GlobalMenu.java
--- 
a/modules/org.openbravo.client.application/src/org/openbravo/client/application/GlobalMenu.java
     Thu Mar 27 09:53:31 2014 +0100
+++ 
b/modules/org.openbravo.client.application/src/org/openbravo/client/application/GlobalMenu.java
     Thu Mar 27 12:10:34 2014 +0100
@@ -83,7 +83,7 @@
     String menuKey = language + tree.getId();
     if (menuOptionsByLangAndTree.get(menuKey) == null) {
       menuOptionsByLangAndTree.put(menuKey, createInitialMenuList(tree, 
language));
-      log.info("Generating menu took " + (System.currentTimeMillis() - t));
+      log.debug("Generating menu took " + (System.currentTimeMillis() - t));
       t = System.currentTimeMillis();
     } else {
       log.debug("Using cached menu for tree and language");
@@ -105,7 +105,7 @@
       menuOption.setParentMenuOption(menuOptionsByMenuId);
     }
 
-    log.debug("Getting a copy of globally cached menu took {} ms", 
System.currentTimeMillis());
+    log.debug("Getting a copy of globally cached menu took {} ms", 
System.currentTimeMillis() - t);
     return newOptions;
   }
 
@@ -274,7 +274,7 @@
    * Invalidates menu cache. To be invoked when the menu changes.
    */
   public void invalidateCache() {
-    log.info("Invalidating menu cache");
+    log.debug("Invalidating menu cache");
     menuOptionsByLangAndTree = new HashMap<String, List<MenuOption>>();
     cacheTimeStamp = System.currentTimeMillis();
   }

------------------------------------------------------------------------------
_______________________________________________
Openbravo-commits mailing list
Openbravo-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to