Author: ashish
Date: Fri May 11 04:51:55 2012 New Revision: 1337026 URL: http://svn.apache.org/viewvc?rev=1337026&view=rev Log: Applied similar fix as we did on trunk r1300463. On production systems you can't suppress Debug.log( message by the use of debug.properties file. It is always good to use Debug.* statements that are having log level setup in debug.properties file. The real problem comes with Debug.log( statement when you are printing any list or map object that contains so many records(or data) in it. Here I am changing all the occurrence of Debug.log( with Debug.logInfo(, Debug.logError( or Debug.logWarning( so that we can have better control of Debug.* statements on production system. :-) Bad use of Debug statement. On production system you will get false alarm that you are having error in code base although the resultant statement is only giving additional information instead of error message. If conditional check is used for some debug level lets say "Verbose" then the containing Debug statement will be Debug.logVerbose() instead of Debug.logInfo() - Comment from Jacopo and Adrian. Modified: ofbiz/branches/release11.04/applications/accounting/src/org/ofbiz/accounting/thirdparty/clearcommerce/CCPaymentServices.java ofbiz/branches/release11.04/framework/webapp/src/org/ofbiz/webapp/event/ServiceEventHandler.java ofbiz/branches/release11.04/specialpurpose/shark/src/org/ofbiz/shark/audit/EntityAuditMgr.java ofbiz/branches/release11.04/specialpurpose/shark/src/org/ofbiz/shark/instance/EntityPersistentMgr.java Modified: ofbiz/branches/release11.04/applications/accounting/src/org/ofbiz/accounting/thirdparty/clearcommerce/CCPaymentServices.java URL: http://svn.apache.org/viewvc/ofbiz/branches/release11.04/applications/accounting/src/org/ofbiz/accounting/thirdparty/clearcommerce/CCPaymentServices.java?rev=1337026&r1=1337025&r2=1337026&view=diff ============================================================================== --- ofbiz/branches/release11.04/applications/accounting/src/org/ofbiz/accounting/thirdparty/clearcommerce/CCPaymentServices.java (original) +++ ofbiz/branches/release11.04/applications/accounting/src/org/ofbiz/accounting/thirdparty/clearcommerce/CCPaymentServices.java Fri May 11 04:51:55 2012 @@ -706,7 +706,7 @@ public class CCPaymentServices { Map<String, Object> pbOrder = UtilGenerics.checkMap(context.get("pbOrder")); if (pbOrder != null) { - if (Debug.verboseOn()) Debug.logInfo("pbOrder Map not empty:" + pbOrder.toString(),module); + if (Debug.verboseOn()) Debug.logVerbose("pbOrder Map not empty:" + pbOrder.toString(),module); Element pbOrderElement = UtilXml.addChildElement(orderFormDocElement, "PbOrder", requestDocument); // periodic billing order UtilXml.addChildElementValue(pbOrderElement, "OrderFrequencyCycle", (String) pbOrder.get("OrderFrequencyCycle"), requestDocument); Element interval = UtilXml.addChildElementValue(pbOrderElement, "OrderFrequencyInterval", (String) pbOrder.get("OrderFrequencyInterval"), requestDocument); Modified: ofbiz/branches/release11.04/framework/webapp/src/org/ofbiz/webapp/event/ServiceEventHandler.java URL: http://svn.apache.org/viewvc/ofbiz/branches/release11.04/framework/webapp/src/org/ofbiz/webapp/event/ServiceEventHandler.java?rev=1337026&r1=1337025&r2=1337026&view=diff ============================================================================== --- ofbiz/branches/release11.04/framework/webapp/src/org/ofbiz/webapp/event/ServiceEventHandler.java (original) +++ ofbiz/branches/release11.04/framework/webapp/src/org/ofbiz/webapp/event/ServiceEventHandler.java Fri May 11 04:51:55 2012 @@ -245,7 +245,7 @@ public class ServiceEventHandler impleme if (UtilValidate.isNotEmpty(modelParam.stringMapPrefix)) { Map<String, Object> paramMap = UtilHttp.makeParamMapWithPrefix(request, multiPartMap, modelParam.stringMapPrefix, null); value = paramMap; - if (Debug.verboseOn()) Debug.logInfo("Set [" + modelParam.name + "]: " + paramMap, module); + if (Debug.verboseOn()) Debug.logVerbose("Set [" + modelParam.name + "]: " + paramMap, module); } else if (UtilValidate.isNotEmpty(modelParam.stringListSuffix)) { List<Object> paramList = UtilHttp.makeParamListWithSuffix(request, multiPartMap, modelParam.stringListSuffix, null); value = paramList; Modified: ofbiz/branches/release11.04/specialpurpose/shark/src/org/ofbiz/shark/audit/EntityAuditMgr.java URL: http://svn.apache.org/viewvc/ofbiz/branches/release11.04/specialpurpose/shark/src/org/ofbiz/shark/audit/EntityAuditMgr.java?rev=1337026&r1=1337025&r2=1337026&view=diff ============================================================================== --- ofbiz/branches/release11.04/specialpurpose/shark/src/org/ofbiz/shark/audit/EntityAuditMgr.java (original) +++ ofbiz/branches/release11.04/specialpurpose/shark/src/org/ofbiz/shark/audit/EntityAuditMgr.java Fri May 11 04:51:55 2012 @@ -151,23 +151,23 @@ public class EntityAuditMgr implements E processHistory.addAll(getCreateProcessEvents(processId)); processHistory.addAll(getProcessDataEvents(processId)); processHistory.addAll(getProcessStateEvents(processId)); - if (Debug.verboseOn()) Debug.logInfo(":: restoreProcessHistory :: " + processHistory.size(), module); + if (Debug.verboseOn()) Debug.logVerbose(":: restoreProcessHistory :: " + processHistory.size(), module); return processHistory; } public List restoreActivityHistory(String processId, String activityId, SharkTransaction trans) throws EventAuditException { - if (Debug.verboseOn()) Debug.logInfo(":: restoreActivityHistory ::", module); + if (Debug.verboseOn()) Debug.logVerbose(":: restoreActivityHistory ::", module); List activityHistory = new ArrayList(); activityHistory.addAll(getAssignmentEvents(processId, activityId)); activityHistory.addAll(getActivityDataEvents(processId, activityId)); activityHistory.addAll(getActivityStateEvents(processId, activityId)); - if (Debug.verboseOn()) Debug.logInfo(":: restoreActivityHistory :: " + activityHistory.size(), module); + if (Debug.verboseOn()) Debug.logVerbose(":: restoreActivityHistory :: " + activityHistory.size(), module); return activityHistory; } // process history private List getCreateProcessEvents(String processId) throws EventAuditException { - if (Debug.verboseOn()) Debug.logInfo(":: getCreateProcessEvents ::", module); + if (Debug.verboseOn()) Debug.logVerbose(":: getCreateProcessEvents ::", module); Delegator delegator = SharkContainer.getDelegator(); List createProcessEvents = new ArrayList(); List lookupList = null; @@ -190,7 +190,7 @@ public class EntityAuditMgr implements E } private List getProcessStateEvents(String processId) throws EventAuditException { - if (Debug.verboseOn()) Debug.logInfo(":: getProcessStateEvents ::", module); + if (Debug.verboseOn()) Debug.logVerbose(":: getProcessStateEvents ::", module); Delegator delegator = SharkContainer.getDelegator(); List stateEvents = new ArrayList(); List lookupList = null; @@ -213,7 +213,7 @@ public class EntityAuditMgr implements E } private List getProcessDataEvents(String processId) throws EventAuditException { - if (Debug.verboseOn()) Debug.logInfo(":: getProcessDataEvents ::", module); + if (Debug.verboseOn()) Debug.logVerbose(":: getProcessDataEvents ::", module); Delegator delegator = SharkContainer.getDelegator(); List dataEvents = new ArrayList(); List lookupList = null; @@ -237,7 +237,7 @@ public class EntityAuditMgr implements E // activity history private List getAssignmentEvents(String processId, String activityId) throws EventAuditException { - if (Debug.verboseOn()) Debug.logInfo(":: getAssignmentEvents ::", module); + if (Debug.verboseOn()) Debug.logVerbose(":: getAssignmentEvents ::", module); Delegator delegator = SharkContainer.getDelegator(); List assignmentEvents = new ArrayList(); List lookupList = null; @@ -260,7 +260,7 @@ public class EntityAuditMgr implements E } private List getActivityStateEvents(String processId, String activityId) throws EventAuditException { - if (Debug.verboseOn()) Debug.logInfo(":: getActivityStateEvents ::", module); + if (Debug.verboseOn()) Debug.logVerbose(":: getActivityStateEvents ::", module); Delegator delegator = SharkContainer.getDelegator(); List stateEvents = new ArrayList(); List lookupList = null; @@ -283,7 +283,7 @@ public class EntityAuditMgr implements E } private List getActivityDataEvents(String processId, String activityId) throws EventAuditException { - if (Debug.verboseOn()) Debug.logInfo(":: getActivityDataEvents ::", module); + if (Debug.verboseOn()) Debug.logVerbose(":: getActivityDataEvents ::", module); Delegator delegator = SharkContainer.getDelegator(); List dataEvents = new ArrayList(); List lookupList = null; Modified: ofbiz/branches/release11.04/specialpurpose/shark/src/org/ofbiz/shark/instance/EntityPersistentMgr.java URL: http://svn.apache.org/viewvc/ofbiz/branches/release11.04/specialpurpose/shark/src/org/ofbiz/shark/instance/EntityPersistentMgr.java?rev=1337026&r1=1337025&r2=1337026&view=diff ============================================================================== --- ofbiz/branches/release11.04/specialpurpose/shark/src/org/ofbiz/shark/instance/EntityPersistentMgr.java (original) +++ ofbiz/branches/release11.04/specialpurpose/shark/src/org/ofbiz/shark/instance/EntityPersistentMgr.java Fri May 11 04:51:55 2012 @@ -176,7 +176,7 @@ public class EntityPersistentMgr impleme } public boolean restore(ProcessVariablePersistenceInterface processVariablePersistenceInterface, SharkTransaction trans) throws PersistenceException { - if (Debug.verboseOn()) Debug.logInfo(":: ProcessVariablePersistenceInterface ::", module); + if (Debug.verboseOn()) Debug.logVerbose(":: ProcessVariablePersistenceInterface ::", module); if (processVariablePersistenceInterface == null) { return false; } @@ -190,7 +190,7 @@ public class EntityPersistentMgr impleme } public boolean restore(ActivityVariablePersistenceInterface activityVariablePersistenceInterface, SharkTransaction trans) throws PersistenceException { - if (Debug.verboseOn()) Debug.logInfo(":: ActivityVariablePersistenceInterface ::", module); + if (Debug.verboseOn()) Debug.logVerbose(":: ActivityVariablePersistenceInterface ::", module); if (activityVariablePersistenceInterface == null) { return false; } @@ -352,7 +352,7 @@ public class EntityPersistentMgr impleme } public List getAllProcessMgrs(SharkTransaction trans) throws PersistenceException { - if (Debug.verboseOn()) Debug.logInfo(":: getAllProcessMgrs ::", module); + if (Debug.verboseOn()) Debug.logVerbose(":: getAllProcessMgrs ::", module); Delegator delegator = SharkContainer.getDelegator(); List createdList = new ArrayList(); List lookupList = null; @@ -382,7 +382,7 @@ public class EntityPersistentMgr impleme } public List getAllResources(SharkTransaction trans) throws PersistenceException { - if (Debug.verboseOn()) Debug.logInfo(":: getAllResources ::", module); + if (Debug.verboseOn()) Debug.logVerbose(":: getAllResources ::", module); Delegator delegator = SharkContainer.getDelegator(); List createdList = new ArrayList(); List lookupList = null; @@ -402,7 +402,7 @@ public class EntityPersistentMgr impleme } public List getAllAssignments(SharkTransaction trans) throws PersistenceException { - if (Debug.verboseOn()) Debug.logInfo(":: getAllAssignments ::", module); + if (Debug.verboseOn()) Debug.logVerbose(":: getAllAssignments ::", module); Delegator delegator = SharkContainer.getDelegator(); List createdList = new ArrayList(); List lookupList = null; @@ -421,7 +421,7 @@ public class EntityPersistentMgr impleme return createdList; } public List getAllActivities(SharkTransaction trans) throws PersistenceException { - if (Debug.verboseOn()) Debug.logInfo(":: getAllActivities ::", module); + if (Debug.verboseOn()) Debug.logVerbose(":: getAllActivities ::", module); Delegator delegator = SharkContainer.getDelegator(); List createdList = new ArrayList(); List lookupList = null; @@ -441,12 +441,12 @@ public class EntityPersistentMgr impleme } public List getAllProcessesForMgr(String mgrName, SharkTransaction trans) throws PersistenceException { - if (Debug.verboseOn()) Debug.logInfo(":: getAllProcessesForMgr ::", module); + if (Debug.verboseOn()) Debug.logVerbose(":: getAllProcessesForMgr ::", module); return this.getProcessesForMgr(mgrName, null, trans); } public List getProcessesForMgr(String mgrName, String state, SharkTransaction trans) throws PersistenceException { - if (Debug.verboseOn()) Debug.logInfo(":: getProcessesForMgr ::", module); + if (Debug.verboseOn()) Debug.logVerbose(":: getProcessesForMgr ::", module); Delegator delegator = SharkContainer.getDelegator(); List createdList = new ArrayList(); List lookupList = null; @@ -681,7 +681,7 @@ public class EntityPersistentMgr impleme } public List getAllVariablesForProcess(String processId, SharkTransaction trans) throws PersistenceException { - if (Debug.verboseOn()) Debug.logInfo(":: getAllVariablesForProcess ::", module); + if (Debug.verboseOn()) Debug.logVerbose(":: getAllVariablesForProcess ::", module); Delegator delegator = SharkContainer.getDelegator(); List createdList = new ArrayList(); List lookupList = null; @@ -701,13 +701,13 @@ public class EntityPersistentMgr impleme } else { Debug.logInfo("Lookup list empty", module); } - if (Debug.verboseOn()) Debug.logInfo("Returning list : " + createdList.size(), module); + if (Debug.verboseOn()) Debug.logVerbose("Returning list : " + createdList.size(), module); return createdList; } public List getAllVariablesForActivity(String activityId, SharkTransaction trans) throws PersistenceException { - if (Debug.verboseOn()) Debug.logInfo(":: getAllVariablesForActivity ::", module); + if (Debug.verboseOn()) Debug.logVerbose(":: getAllVariablesForActivity ::", module); Delegator delegator = SharkContainer.getDelegator(); List createdList = new ArrayList(); List lookupList = null; @@ -1003,7 +1003,7 @@ public class EntityPersistentMgr impleme return returnList; } public List getAllProcesses(SharkTransaction trans) throws PersistenceException { - if (Debug.verboseOn()) Debug.logInfo(":: getAllProcesses ::", module); + if (Debug.verboseOn()) Debug.logVerbose(":: getAllProcesses ::", module); Delegator delegator = SharkContainer.getDelegator(); List createdList = new ArrayList(); List lookupList = null; |
Free forum by Nabble | Edit this page |