You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by Jacques Le Roux <ja...@les7arts.com> on 2012/05/11 08:11:02 UTC
Re: svn commit: r1337024 - in /ofbiz/trunk: applications/accounting/src/org/ofbiz/accounting/thirdparty/clearcommerce/ framework/base/src/org/ofbiz/base/util/ framework/webapp/src/org/ofbiz/webapp/event/ specialpurpose/shark/src/org/ofbiz/shark/audit/ spec
Ashish is already aware, Adrian noticed it. I guess, Ashish will not revert but use the right corresponding level...
Jacques
PS: top posted because closing the thread
From: "Adam Heath" <do...@brainfood.com>
> On 05/10/2012 11:46 PM, ashish@apache.org wrote:
>> Author: ashish
>> Date: Fri May 11 04:46:26 2012
>> New Revision: 1337024
>>
>> URL: http://svn.apache.org/viewvc?rev=1337024&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/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/clearcommerce/CCPaymentServices.java
>> ofbiz/trunk/framework/base/src/org/ofbiz/base/util/HttpClient.java
>> ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/event/ServiceEventHandler.java
>> ofbiz/trunk/specialpurpose/shark/src/org/ofbiz/shark/audit/EntityAuditMgr.java
>> ofbiz/trunk/specialpurpose/shark/src/org/ofbiz/shark/instance/EntityPersistentMgr.java
>>
>> Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/clearcommerce/CCPaymentServices.java
>> URL:
>> http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/clearcommerce/CCPaymentServices.java?rev=1337024&r1=1337023&r2=1337024&view=diff
>> ==============================================================================
>> --- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/clearcommerce/CCPaymentServices.java (original)
>> +++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/clearcommerce/CCPaymentServices.java Fri May 11
>> 04:46:26 2012
>> @@ -703,7 +703,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/trunk/framework/base/src/org/ofbiz/base/util/HttpClient.java
>> URL:
>> http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/HttpClient.java?rev=1337024&r1=1337023&r2=1337024&view=diff
>> ==============================================================================
>> --- ofbiz/trunk/framework/base/src/org/ofbiz/base/util/HttpClient.java (original)
>> +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/util/HttpClient.java Fri May 11 04:46:26 2012
>> @@ -361,7 +361,7 @@ public class HttpClient {
>> }
>> }
>>
>> - if (Debug.verboseOn() || debug) Debug.logInfo("Content-Type: " + contentType, module);
>> + if (Debug.verboseOn() || debug) Debug.logVerbose("Content-Type: " + contentType, module);
>
> Er, no. The '|| debug' means that this is not a normal situation. Don't change it in this case.
>
> (there are other similar changes that I removed from the email, please revert)