IDEMPIERE-638 Check log level before calling logging method / s_log.fine

This commit is contained in:
Richard Morales 2013-02-22 15:50:25 -05:00
parent b5102829f1
commit 7c53aa5f4d
37 changed files with 98 additions and 94 deletions

View File

@ -174,7 +174,7 @@ public class DocumentTypeVerify extends SvrProcess
if (pc.save()) if (pc.save())
{ {
counter++; counter++;
s_log.fine(pc.toString()); if (s_log.isLoggable(Level.FINE)) s_log.fine(pc.toString());
} }
else else
s_log.warning("Not saved: " + pc); s_log.warning("Not saved: " + pc);

View File

@ -147,7 +147,7 @@ public class SequenceCheck extends SvrProcess
sp.addLog(0, null, null,msglog.toString()); sp.addLog(0, null, null,msglog.toString());
} }
else else
s_log.fine("Sync #" + no); if (s_log.isLoggable(Level.FINE)) s_log.fine("Sync #" + no);
} }
if (no >= 0) if (no >= 0)
return; return;
@ -239,7 +239,7 @@ public class SequenceCheck extends SvrProcess
DB.close(rs, pstmt); DB.close(rs, pstmt);
rs = null; pstmt = null; rs = null; pstmt = null;
} }
s_log.fine("#" + counter); if (s_log.isLoggable(Level.FINE)) s_log.fine("#" + counter);
} // checkTableID } // checkTableID

View File

@ -136,8 +136,7 @@ public class Core {
* @return initialized PaymentProcessor or null * @return initialized PaymentProcessor or null
*/ */
public static PaymentProcessor getPaymentProcessor(MBankAccountProcessor mbap, PaymentInterface mp) { public static PaymentProcessor getPaymentProcessor(MBankAccountProcessor mbap, PaymentInterface mp) {
if (s_log.isLoggable(Level.FINE)) if (s_log.isLoggable(Level.FINE)) s_log.fine("create for " + mbap);
s_log.fine("create for " + mbap);
MPaymentProcessor mpp = new MPaymentProcessor(mbap.getCtx(), mbap.getC_PaymentProcessor_ID(), mbap.get_TrxName()); MPaymentProcessor mpp = new MPaymentProcessor(mbap.getCtx(), mbap.getC_PaymentProcessor_ID(), mbap.get_TrxName());
String className = mpp.getPayProcessorClass(); String className = mpp.getPayProcessorClass();
@ -177,8 +176,7 @@ public class Core {
*/ */
public static IShipmentProcessor getShipmentProcessor(MShipperFacade sf) public static IShipmentProcessor getShipmentProcessor(MShipperFacade sf)
{ {
if (s_log.isLoggable(Level.FINE)) if (s_log.isLoggable(Level.FINE)) s_log.fine("create for " + sf);
s_log.fine("create for " + sf);
String className = sf.getShippingProcessorClass(); String className = sf.getShippingProcessorClass();
if (className == null || className.length() == 0) if (className == null || className.length() == 0)

View File

@ -232,7 +232,7 @@ public class DefaultModelFactory implements IModelFactory {
{ {
if (superClazz == PO.class) if (superClazz == PO.class)
{ {
s_log.fine("Use: " + className); if (s_log.isLoggable(Level.FINE)) s_log.fine("Use: " + className);
return clazz; return clazz;
} }
superClazz = superClazz.getSuperclass(); superClazz = superClazz.getSuperclass();

View File

@ -556,7 +556,7 @@ public class Doc_Order extends Doc
if (!tax.isZeroTax()) if (!tax.isZeroTax())
{ {
BigDecimal LineNetAmtTax = tax.calculateTax(LineNetAmt, true, precision); BigDecimal LineNetAmtTax = tax.calculateTax(LineNetAmt, true, precision);
s_log.fine("LineNetAmt=" + LineNetAmt + " - Tax=" + LineNetAmtTax); if (s_log.isLoggable(Level.FINE)) s_log.fine("LineNetAmt=" + LineNetAmt + " - Tax=" + LineNetAmtTax);
LineNetAmt = LineNetAmt.subtract(LineNetAmtTax); LineNetAmt = LineNetAmt.subtract(LineNetAmtTax);
BigDecimal PriceListTax = tax.calculateTax(PriceList, true, precision); BigDecimal PriceListTax = tax.calculateTax(PriceList, true, precision);
PriceList = PriceList.subtract(PriceListTax); PriceList = PriceList.subtract(PriceListTax);
@ -697,7 +697,7 @@ public class Doc_Order extends Doc
if (!tax.isZeroTax()) if (!tax.isZeroTax())
{ {
BigDecimal LineNetAmtTax = tax.calculateTax(LineNetAmt, true, precision); BigDecimal LineNetAmtTax = tax.calculateTax(LineNetAmt, true, precision);
s_log.fine("LineNetAmt=" + LineNetAmt + " - Tax=" + LineNetAmtTax); if (s_log.isLoggable(Level.FINE)) s_log.fine("LineNetAmt=" + LineNetAmt + " - Tax=" + LineNetAmtTax);
LineNetAmt = LineNetAmt.subtract(LineNetAmtTax); LineNetAmt = LineNetAmt.subtract(LineNetAmtTax);
BigDecimal PriceListTax = tax.calculateTax(PriceList, true, precision); BigDecimal PriceListTax = tax.calculateTax(PriceList, true, precision);
PriceList = PriceList.subtract(PriceListTax); PriceList = PriceList.subtract(PriceListTax);

View File

@ -227,7 +227,7 @@ public class MAccount extends X_C_ValidCombination
s_log.log(Level.SEVERE, "Could not create new account - " + info); s_log.log(Level.SEVERE, "Could not create new account - " + info);
return null; return null;
} }
s_log.fine("New: " + newAccount); if (s_log.isLoggable(Level.FINE)) s_log.fine("New: " + newAccount);
return newAccount; return newAccount;
} // get } // get
@ -330,7 +330,7 @@ public class MAccount extends X_C_ValidCombination
else if (elementType.equals(MAcctSchemaElement.ELEMENTTYPE_UserElement2) && setValue) else if (elementType.equals(MAcctSchemaElement.ELEMENTTYPE_UserElement2) && setValue)
vc.setUserElement2_ID(defaultValue); vc.setUserElement2_ID(defaultValue);
} }
s_log.fine("Client_ID=" if (s_log.isLoggable(Level.FINE)) s_log.fine("Client_ID="
+ vc.getAD_Client_ID() + ", Org_ID=" + vc.getAD_Org_ID() + vc.getAD_Client_ID() + ", Org_ID=" + vc.getAD_Org_ID()
+ " - AcctSchema_ID=" + vc.getC_AcctSchema_ID() + ", Account_ID=" + vc.getAccount_ID()); + " - AcctSchema_ID=" + vc.getC_AcctSchema_ID() + ", Account_ID=" + vc.getAccount_ID());
return vc; return vc;

View File

@ -60,7 +60,7 @@ public final class MAcctSchemaElement extends X_C_AcctSchema_Element
if (retValue != null) if (retValue != null)
return retValue; return retValue;
s_log.fine("C_AcctSchema_ID=" + as.getC_AcctSchema_ID()); if (s_log.isLoggable(Level.FINE)) s_log.fine("C_AcctSchema_ID=" + as.getC_AcctSchema_ID());
ArrayList<MAcctSchemaElement> list = new ArrayList<MAcctSchemaElement>(); ArrayList<MAcctSchemaElement> list = new ArrayList<MAcctSchemaElement>();
final String whereClause = "C_AcctSchema_ID=? AND IsActive=?"; final String whereClause = "C_AcctSchema_ID=? AND IsActive=?";
@ -71,7 +71,7 @@ public final class MAcctSchemaElement extends X_C_AcctSchema_Element
for(MAcctSchemaElement ase : elements) for(MAcctSchemaElement ase : elements)
{ {
s_log.fine(" - " + ase); if (s_log.isLoggable(Level.FINE)) s_log.fine(" - " + ase);
if (ase.isMandatory() && ase.getDefaultValue() == 0) if (ase.isMandatory() && ase.getDefaultValue() == 0)
s_log.log(Level.SEVERE, "No default value for " + ase.getName()); s_log.log(Level.SEVERE, "No default value for " + ase.getName());
list.add(ase); list.add(ase);

View File

@ -6,6 +6,7 @@ import java.sql.ResultSet;
import java.sql.Timestamp; import java.sql.Timestamp;
import java.util.List; import java.util.List;
import java.util.Properties; import java.util.Properties;
import java.util.logging.Level;
import org.adempiere.exceptions.FillMandatoryException; import org.adempiere.exceptions.FillMandatoryException;
import org.compiere.process.DocAction; import org.compiere.process.DocAction;
@ -35,11 +36,11 @@ import org.idempiere.fa.util.POCacheLocal;
public class MAssetAddition extends X_A_Asset_Addition public class MAssetAddition extends X_A_Asset_Addition
implements DocAction implements DocAction
{ {
/** /**
* *
*/ */
private static final long serialVersionUID = 5977180589101094202L; private static final long serialVersionUID = 5977180589101094202L;
/** Static Logger */ /** Static Logger */
private static CLogger s_log = CLogger.getCLogger(MAssetAddition.class); private static CLogger s_log = CLogger.getCLogger(MAssetAddition.class);
@ -386,7 +387,7 @@ public class MAssetAddition extends X_A_Asset_Addition
} }
if(CLogMgt.isLevelFine()) s_log.fine("Entering: model=" + model + ", M_MatchInv_ID=" + M_MatchInv_ID + ", newRecord=" + newRecord + ", trxName=" + trxName); if (s_log.isLoggable(Level.FINE)) s_log.fine("Entering: model=" + model + ", M_MatchInv_ID=" + M_MatchInv_ID + ", newRecord=" + newRecord + ", trxName=" + trxName);
final String qMatchInv_select = "SELECT" final String qMatchInv_select = "SELECT"
+ " C_Invoice_ID" + " C_Invoice_ID"
@ -435,7 +436,7 @@ public class MAssetAddition extends X_A_Asset_Addition
*/ */
SetGetUtil.updateColumns(model, null, query, trxName); SetGetUtil.updateColumns(model, null, query, trxName);
if(CLogMgt.isLevelFine()) s_log.fine("Leaving: RETURN TRUE"); s_log.fine("Leaving: RETURN TRUE");
return true; return true;
} }

View File

@ -15,6 +15,7 @@ package org.compiere.model;
import java.sql.ResultSet; import java.sql.ResultSet;
import java.util.Properties; import java.util.Properties;
import java.util.logging.Level;
import org.compiere.model.MRefList; import org.compiere.model.MRefList;
import org.compiere.model.PO; import org.compiere.model.PO;
@ -103,7 +104,7 @@ public class MAssetChange extends X_A_Asset_Change
} }
public static MAssetChange create(Properties ctx, String changeType, PO[] pos, boolean save, String trxName) { public static MAssetChange create(Properties ctx, String changeType, PO[] pos, boolean save, String trxName) {
s_log.fine("Entering: changeType=" + changeType); if (s_log.isLoggable(Level.FINE)) s_log.fine("Entering: changeType=" + changeType);
if (pos == null || pos.length == 0) { if (pos == null || pos.length == 0) {
s_log.fine("Entering/Leaving: POs is empty"); s_log.fine("Entering/Leaving: POs is empty");
return null; return null;
@ -117,7 +118,7 @@ public class MAssetChange extends X_A_Asset_Change
change.saveEx(); change.saveEx();
} }
// //
s_log.fine("Leaving: change=" + change); if (s_log.isLoggable(Level.FINE)) s_log.fine("Leaving: change=" + change);
return change; return change;
} }

View File

@ -21,6 +21,7 @@ import java.sql.ResultSet;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Properties; import java.util.Properties;
import java.util.logging.Level;
import org.compiere.util.CLogger; import org.compiere.util.CLogger;
import org.compiere.util.DB; import org.compiere.util.DB;
@ -74,7 +75,7 @@ public class MAttribute extends X_M_Attribute
MAttribute[] retValue = new MAttribute[list.size ()]; MAttribute[] retValue = new MAttribute[list.size ()];
list.toArray (retValue); list.toArray (retValue);
s_log.fine("AD_Client_ID=" + AD_Client_ID + " - #" + list.size()); if (s_log.isLoggable(Level.FINE)) s_log.fine("AD_Client_ID=" + AD_Client_ID + " - #" + list.size());
return retValue; return retValue;
} // getOfClient } // getOfClient

View File

@ -61,11 +61,11 @@ public class MAttributeSetInstance extends X_M_AttributeSetInstance
// Load Instance if not 0 // Load Instance if not 0
if (M_AttributeSetInstance_ID != 0) if (M_AttributeSetInstance_ID != 0)
{ {
s_log.fine("From M_AttributeSetInstance_ID=" + M_AttributeSetInstance_ID); if (s_log.isLoggable(Level.FINE)) s_log.fine("From M_AttributeSetInstance_ID=" + M_AttributeSetInstance_ID);
return new MAttributeSetInstance (ctx, M_AttributeSetInstance_ID, null); return new MAttributeSetInstance (ctx, M_AttributeSetInstance_ID, null);
} }
// Get new from Product // Get new from Product
s_log.fine("From M_Product_ID=" + M_Product_ID); if (s_log.isLoggable(Level.FINE)) s_log.fine("From M_Product_ID=" + M_Product_ID);
if (M_Product_ID == 0) if (M_Product_ID == 0)
return null; return null;
String sql = "SELECT M_AttributeSet_ID, M_AttributeSetInstance_ID " String sql = "SELECT M_AttributeSet_ID, M_AttributeSetInstance_ID "

View File

@ -122,7 +122,7 @@ public class MBankAccountProcessor extends X_C_BankAccount_Processor {
s_log.warning("find - not found - AD_Client_ID=" + AD_Client_ID s_log.warning("find - not found - AD_Client_ID=" + AD_Client_ID
+ ", C_Currency_ID=" + C_Currency_ID + ", Amt=" + Amt); + ", C_Currency_ID=" + C_Currency_ID + ", Amt=" + Amt);
else else
s_log.fine("find - #" + list.size() + " - AD_Client_ID=" + AD_Client_ID if (s_log.isLoggable(Level.FINE)) s_log.fine("find - #" + list.size() + " - AD_Client_ID=" + AD_Client_ID
+ ", C_Currency_ID=" + C_Currency_ID + ", Amt=" + Amt); + ", C_Currency_ID=" + C_Currency_ID + ", Amt=" + Amt);
MBankAccountProcessor[] retValue = new MBankAccountProcessor[list.size()]; MBankAccountProcessor[] retValue = new MBankAccountProcessor[list.size()];
list.toArray(retValue); list.toArray(retValue);

View File

@ -19,6 +19,7 @@ package org.compiere.model;
import java.sql.ResultSet; import java.sql.ResultSet;
import java.sql.Timestamp; import java.sql.Timestamp;
import java.util.Properties; import java.util.Properties;
import java.util.logging.Level;
import org.compiere.util.CLogger; import org.compiere.util.CLogger;
import org.compiere.util.Env; import org.compiere.util.Env;
@ -62,10 +63,10 @@ public class MContactInterest extends X_R_ContactInterest
{ {
retValue = new MContactInterest (ctx, R_InterestArea_ID, AD_User_ID, retValue = new MContactInterest (ctx, R_InterestArea_ID, AD_User_ID,
isActive, trxName); isActive, trxName);
s_log.fine("NOT found - " + retValue); if (s_log.isLoggable(Level.FINE)) s_log.fine("NOT found - " + retValue);
} }
else else
s_log.fine("Found - " + retValue); if (s_log.isLoggable(Level.FINE)) s_log.fine("Found - " + retValue);
return retValue; return retValue;
} // get } // get

View File

@ -6,8 +6,8 @@ package org.compiere.model;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.math.RoundingMode; import java.math.RoundingMode;
import java.sql.Timestamp; import java.sql.Timestamp;
import java.util.logging.Level;
import org.compiere.util.CLogMgt;
import org.compiere.util.CLogger; import org.compiere.util.CLogger;
import org.compiere.util.Env; import org.compiere.util.Env;
import org.idempiere.exceptions.NoCurrencyConversionException; import org.idempiere.exceptions.NoCurrencyConversionException;
@ -97,7 +97,7 @@ public final class MConversionRateUtil
if (AmtName != null) if (AmtName != null)
model.set_AttrValue(AmtName, amt); model.set_AttrValue(AmtName, amt);
// Return amt // Return amt
if (CLogMgt.isLevelFine()) s_log.fine("amt=" + sourceAmt + " * " + rate + "=" + amt + ", scale=" + stdPrecision); if (s_log.isLoggable(Level.FINE)) s_log.fine("amt=" + sourceAmt + " * " + rate + "=" + amt + ", scale=" + stdPrecision);
return amt; return amt;
} // convert } // convert
} }

View File

@ -296,7 +296,7 @@ public class MCost extends X_M_Cost
throw new IllegalArgumentException("Unknown Costing Method = " + costingMethod); throw new IllegalArgumentException("Unknown Costing Method = " + costingMethod);
if (retValue != null && retValue.signum() > 0) if (retValue != null && retValue.signum() > 0)
{ {
s_log.fine(product.getName() + ", CostingMethod=" + costingMethod + " - " + retValue); if (s_log.isLoggable(Level.FINE)) s_log.fine(product.getName() + ", CostingMethod=" + costingMethod + " - " + retValue);
return retValue; return retValue;
} }
@ -306,7 +306,7 @@ public class MCost extends X_M_Cost
retValue = getPOPrice(product, C_OrderLine_ID, as.getC_Currency_ID()); retValue = getPOPrice(product, C_OrderLine_ID, as.getC_Currency_ID());
if (retValue != null && retValue.signum() > 0) if (retValue != null && retValue.signum() > 0)
{ {
s_log.fine(product.getName() + ", PO - " + retValue); if (s_log.isLoggable(Level.FINE)) s_log.fine(product.getName() + ", PO - " + retValue);
return retValue; return retValue;
} }
} }
@ -318,7 +318,7 @@ public class MCost extends X_M_Cost
MCost cost = get(product, M_ASI_ID, as, Org_ID, ce.getM_CostElement_ID(), product.get_TrxName()); MCost cost = get(product, M_ASI_ID, as, Org_ID, ce.getM_CostElement_ID(), product.get_TrxName());
if (cost != null && cost.getCurrentCostPrice().signum() > 0) if (cost != null && cost.getCurrentCostPrice().signum() > 0)
{ {
s_log.fine(product.getName() + ", Standard - " + cost); if (s_log.isLoggable(Level.FINE)) s_log.fine(product.getName() + ", Standard - " + cost);
return cost.getCurrentCostPrice(); return cost.getCurrentCostPrice();
} }
} }
@ -334,7 +334,7 @@ public class MCost extends X_M_Cost
retValue = getLastPOPrice(product, M_ASI_ID, 0, as.getC_Currency_ID()); retValue = getLastPOPrice(product, M_ASI_ID, 0, as.getC_Currency_ID());
if (retValue != null && retValue.signum() > 0) if (retValue != null && retValue.signum() > 0)
{ {
s_log.fine(product.getName() + ", LastPO = " + retValue); if (s_log.isLoggable(Level.FINE)) s_log.fine(product.getName() + ", LastPO = " + retValue);
return retValue; return retValue;
} }
} }
@ -346,7 +346,7 @@ public class MCost extends X_M_Cost
retValue = getLastInvoicePrice(product, M_ASI_ID, 0, as.getC_Currency_ID()); retValue = getLastInvoicePrice(product, M_ASI_ID, 0, as.getC_Currency_ID());
if (retValue != null && retValue.signum() != 0) if (retValue != null && retValue.signum() != 0)
{ {
s_log.fine(product.getName() + ", LastInv = " + retValue); if (s_log.isLoggable(Level.FINE)) s_log.fine(product.getName() + ", LastInv = " + retValue);
return retValue; return retValue;
} }
} }
@ -362,7 +362,7 @@ public class MCost extends X_M_Cost
retValue = getLastInvoicePrice(product, M_ASI_ID, 0, as.getC_Currency_ID()); retValue = getLastInvoicePrice(product, M_ASI_ID, 0, as.getC_Currency_ID());
if (retValue != null && retValue.signum() > 0) if (retValue != null && retValue.signum() > 0)
{ {
s_log.fine(product.getName() + ", LastInv = " + retValue); if (s_log.isLoggable(Level.FINE)) s_log.fine(product.getName() + ", LastInv = " + retValue);
return retValue; return retValue;
} }
} }
@ -374,7 +374,7 @@ public class MCost extends X_M_Cost
retValue = getLastPOPrice(product, M_ASI_ID, 0, as.getC_Currency_ID()); retValue = getLastPOPrice(product, M_ASI_ID, 0, as.getC_Currency_ID());
if (retValue != null && retValue.signum() > 0) if (retValue != null && retValue.signum() > 0)
{ {
s_log.fine(product.getName() + ", LastPO = " + retValue); if (s_log.isLoggable(Level.FINE)) s_log.fine(product.getName() + ", LastPO = " + retValue);
return retValue; return retValue;
} }
} }
@ -402,7 +402,7 @@ public class MCost extends X_M_Cost
if (price != null && price.signum() != 0) if (price != null && price.signum() != 0)
{ {
retValue = price; retValue = price;
s_log.fine(product.getName() + ", Product_PO = " + retValue); if (s_log.isLoggable(Level.FINE)) s_log.fine(product.getName() + ", Product_PO = " + retValue);
return retValue; return retValue;
} }
} }
@ -415,7 +415,7 @@ public class MCost extends X_M_Cost
retValue = price; retValue = price;
} }
s_log.fine(product.getName() + " = " + retValue); if (s_log.isLoggable(Level.FINE)) s_log.fine(product.getName() + " = " + retValue);
return retValue; return retValue;
} // getSeedCosts } // getSeedCosts

View File

@ -184,7 +184,7 @@ public class MCostQueue extends X_M_CostQueue
queue.setCurrentQty(newQty); queue.setCurrentQty(newQty);
if (queue.save()) if (queue.save())
{ {
s_log.fine("Qty=" + remainingQty if (s_log.isLoggable(Level.FINE)) s_log.fine("Qty=" + remainingQty
+ "(!), ASI=" + queue.getM_AttributeSetInstance_ID() + "(!), ASI=" + queue.getM_AttributeSetInstance_ID()
+ " - " + oldQty + " -> " + newQty); + " - " + oldQty + " -> " + newQty);
return queue.getCurrentCostPrice(); return queue.getCurrentCostPrice();
@ -204,7 +204,7 @@ public class MCostQueue extends X_M_CostQueue
queue.setCurrentQty(newQty); queue.setCurrentQty(newQty);
if (queue.save()) if (queue.save())
{ {
s_log.fine("Qty=" + reduction if (s_log.isLoggable(Level.FINE)) s_log.fine("Qty=" + reduction
+ ", ASI=" + queue.getM_AttributeSetInstance_ID() + ", ASI=" + queue.getM_AttributeSetInstance_ID()
+ " - " + oldQty + " -> " + newQty); + " - " + oldQty + " -> " + newQty);
remainingQty = remainingQty.subtract(reduction); remainingQty = remainingQty.subtract(reduction);
@ -219,7 +219,7 @@ public class MCostQueue extends X_M_CostQueue
} }
} // for queue } // for queue
s_log.fine("RemainingQty=" + remainingQty); if (s_log.isLoggable(Level.FINE)) s_log.fine("RemainingQty=" + remainingQty);
return null; return null;
} // adjustQty } // adjustQty
@ -275,7 +275,7 @@ public class MCostQueue extends X_M_CostQueue
lastPrice = queue.getCurrentCostPrice(); lastPrice = queue.getCurrentCostPrice();
BigDecimal costBatch = lastPrice.multiply(reduction); BigDecimal costBatch = lastPrice.multiply(reduction);
cost = cost.add(costBatch); cost = cost.add(costBatch);
s_log.fine("ASI=" + queue.getM_AttributeSetInstance_ID() if (s_log.isLoggable(Level.FINE)) s_log.fine("ASI=" + queue.getM_AttributeSetInstance_ID()
+ " - Cost=" + lastPrice + " * Qty=" + reduction + " = " + costBatch); + " - Cost=" + lastPrice + " * Qty=" + reduction + " = " + costBatch);
remainingQty = remainingQty.subtract(reduction); remainingQty = remainingQty.subtract(reduction);
// Done // Done

View File

@ -142,7 +142,7 @@ public final class MCountry extends X_C_Country
} }
if (s_default == null) if (s_default == null)
s_default = usa; s_default = usa;
s_log.fine("#" + s_countries.size() if (s_log.isLoggable(Level.FINE)) s_log.fine("#" + s_countries.size()
+ " - Default=" + s_default); + " - Default=" + s_default);
} // loadAllCountries } // loadAllCountries

View File

@ -3,6 +3,7 @@ import java.math.BigDecimal;
import java.math.RoundingMode; import java.math.RoundingMode;
import java.sql.ResultSet; import java.sql.ResultSet;
import java.util.Properties; import java.util.Properties;
import java.util.logging.Level;
import java.util.logging.Logger; import java.util.logging.Logger;
import org.compiere.model.Query; import org.compiere.model.Query;
@ -372,7 +373,7 @@ public class MDepreciation extends X_A_Depreciation
amt_sl = amt_r.divide(new BigDecimal(A_RemainingLife_Year), getPrecision(), RoundingMode.HALF_UP); amt_sl = amt_r.divide(new BigDecimal(A_RemainingLife_Year), getPrecision(), RoundingMode.HALF_UP);
// logging // logging
if (CLogMgt.isLevelFinest()) { if (CLogMgt.isLevelFinest()) {
s_log.fine("amt_r=" + amt_r + ", amt_ad1=amt_r*coef_ad1=" + amt_ad1 + ", amt_sl=amt_r/A_RemainingLife_Year=" + amt_sl + ", A_Current_Year=" + A_Current_Year + ", A_RemainingLife_Year=" + A_RemainingLife_Year); if (s_log.isLoggable(Level.FINE)) s_log.fine("amt_r=" + amt_r + ", amt_ad1=amt_r*coef_ad1=" + amt_ad1 + ", amt_sl=amt_r/A_RemainingLife_Year=" + amt_sl + ", A_Current_Year=" + A_Current_Year + ", A_RemainingLife_Year=" + A_RemainingLife_Year);
} }
/** If the first year or if the value depreciation value depreciation degressive more linear ... */ /** If the first year or if the value depreciation value depreciation degressive more linear ... */
@ -382,7 +383,7 @@ public class MDepreciation extends X_A_Depreciation
else { else {
amtPerYear = amt_sl; amtPerYear = amt_sl;
is_SL = true; is_SL = true;
s_log.fine("*** PASS IT ON linear amt_sl= " + amt_sl + " ***"); if (s_log.isLoggable(Level.FINE)) s_log.fine("*** PASS IT ON linear amt_sl= " + amt_sl + " ***");
} }
} }
else { else {
@ -391,9 +392,9 @@ public class MDepreciation extends X_A_Depreciation
} }
amt_r = amt_r.subtract(amtPerYear); amt_r = amt_r.subtract(amtPerYear);
if (CLogMgt.isLevelFinest()) s_log.fine("year=" + curr_year + ", amtPerYear=" + amtPerYear + ", amt_r=" + amt_r); //logging if (s_log.isLoggable(Level.FINE)) s_log.fine("year=" + curr_year + ", amtPerYear=" + amtPerYear + ", amt_r=" + amt_r); //logging
} }
if (CLogMgt.isLevelFinest()) s_log.fine("amt_r=" + amt_r + ", amtPerYear=" + amtPerYear); //logging if (s_log.isLoggable(Level.FINE)) s_log.fine("amt_r=" + amt_r + ", amtPerYear=" + amtPerYear); //logging
/** Damping value for the current month */ /** Damping value for the current month */
BigDecimal assetExp = getPeriodExp(A_Current_Period, amtPerYear); BigDecimal assetExp = getPeriodExp(A_Current_Period, amtPerYear);

View File

@ -7,6 +7,7 @@ import java.util.ArrayList;
import java.util.Collection; import java.util.Collection;
import java.util.List; import java.util.List;
import java.util.Properties; import java.util.Properties;
import java.util.logging.Level;
import org.compiere.model.MDocType; import org.compiere.model.MDocType;
import org.compiere.model.MPeriod; import org.compiere.model.MPeriod;
@ -94,7 +95,7 @@ public class MDepreciationExp extends X_A_Depreciation_Exp
// //
depexp.updateFrom(assetwk); depexp.updateFrom(assetwk);
// //
s_log.fine("depexp=" + depexp); if (s_log.isLoggable(Level.FINE)) s_log.fine("depexp=" + depexp);
return depexp; return depexp;
} }

View File

@ -75,7 +75,7 @@ public class MFactAcct extends X_Fact_Acct
{ {
final String sql = "DELETE Fact_Acct WHERE AD_Table_ID=? AND Record_ID=?"; final String sql = "DELETE Fact_Acct WHERE AD_Table_ID=? AND Record_ID=?";
int no = DB.executeUpdateEx(sql, new Object[]{AD_Table_ID, Record_ID}, trxName); int no = DB.executeUpdateEx(sql, new Object[]{AD_Table_ID, Record_ID}, trxName);
s_log.fine("delete - AD_Table_ID=" + AD_Table_ID + ", Record_ID=" + Record_ID + " - #" + no); if (s_log.isLoggable(Level.FINE)) s_log.fine("delete - AD_Table_ID=" + AD_Table_ID + ", Record_ID=" + Record_ID + " - #" + no);
return no; return no;
} }

View File

@ -21,6 +21,7 @@ import java.sql.PreparedStatement;
import java.sql.ResultSet; import java.sql.ResultSet;
import java.sql.SQLException; import java.sql.SQLException;
import java.util.Properties; import java.util.Properties;
import java.util.logging.Level;
import org.adempiere.exceptions.DBException; import org.adempiere.exceptions.DBException;
import org.compiere.util.CLogger; import org.compiere.util.CLogger;
@ -80,7 +81,7 @@ public class MInvoiceTax extends X_C_InvoiceTax
{ {
retValue.set_TrxName(trxName); retValue.set_TrxName(trxName);
retValue.setPrecision(precision); retValue.setPrecision(precision);
s_log.fine("(old=" + oldTax + ") " + retValue); if (s_log.isLoggable(Level.FINE)) s_log.fine("(old=" + oldTax + ") " + retValue);
return retValue; return retValue;
} }
// If the old tax was required and there is no MInvoiceTax for that // If the old tax was required and there is no MInvoiceTax for that
@ -98,7 +99,7 @@ public class MInvoiceTax extends X_C_InvoiceTax
retValue.setC_Tax_ID(line.getC_Tax_ID()); retValue.setC_Tax_ID(line.getC_Tax_ID());
retValue.setPrecision(precision); retValue.setPrecision(precision);
retValue.setIsTaxIncluded(line.isTaxIncluded()); retValue.setIsTaxIncluded(line.isTaxIncluded());
s_log.fine("(new) " + retValue); if (s_log.isLoggable(Level.FINE)) s_log.fine("(new) " + retValue);
return retValue; return retValue;
} // get } // get

View File

@ -19,6 +19,7 @@ package org.compiere.model;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.Iterator; import java.util.Iterator;
import java.util.logging.Level;
import org.compiere.util.CCache; import org.compiere.util.CCache;
import org.compiere.util.CLogger; import org.compiere.util.CLogger;
@ -115,7 +116,7 @@ public class MLookupCache
lookupTarget.put(cacheKey, cacheData); lookupTarget.put(cacheKey, cacheData);
} }
s_log.fine("#" + lookupTarget.size()); if (s_log.isLoggable(Level.FINE)) s_log.fine("#" + lookupTarget.size());
return true; return true;
} // loadFromCache } // loadFromCache
@ -141,7 +142,7 @@ public class MLookupCache
for (int i = 0; i < toDelete.size(); i++) for (int i = 0; i < toDelete.size(); i++)
s_loadedLookups.remove(toDelete.get(i)); s_loadedLookups.remove(toDelete.get(i));
int endNo = s_loadedLookups.size(); int endNo = s_loadedLookups.size();
s_log.fine("WindowNo=" + WindowNo if (s_log.isLoggable(Level.FINE)) s_log.fine("WindowNo=" + WindowNo
+ " - " + startNo + " -> " + endNo); + " - " + startNo + " -> " + endNo);
} // cacheReset } // cacheReset

View File

@ -217,8 +217,7 @@ public class MLookupFactory
return null; return null;
} }
info.Query = newSQL; info.Query = newSQL;
if (s_log.isLoggable(Level.FINE)) if (s_log.isLoggable(Level.FINE)) s_log.fine("getLookupInfo, newSQL ="+newSQL); //jz
s_log.fine("getLookupInfo, newSQL ="+newSQL); //jz
} }
// Direct Query - NO Validation/Security // Direct Query - NO Validation/Security
@ -231,8 +230,7 @@ public class MLookupFactory
return null; return null;
} }
info.QueryDirect = newSQL; info.QueryDirect = newSQL;
if (s_log.isLoggable(Level.FINE)) if (s_log.isLoggable(Level.FINE)) s_log.fine("getLookupInfo, newSQL ="+newSQL); //jz
s_log.fine("getLookupInfo, newSQL ="+newSQL); //jz
} }
// Validation // Validation
@ -760,8 +758,7 @@ public class MLookupFactory
realSQL.append(" ORDER BY 3"); realSQL.append(" ORDER BY 3");
MQuery zoomQuery = null; // corrected in VLookup MQuery zoomQuery = null; // corrected in VLookup
if (s_log.isLoggable(Level.FINE)) if (s_log.isLoggable(Level.FINE)) s_log.fine("ColumnName=" + ColumnName + " - " + realSQL);
s_log.fine("ColumnName=" + ColumnName + " - " + realSQL);
StringBuilder msginf = new StringBuilder().append(TableName).append(".").append(KeyColumn); StringBuilder msginf = new StringBuilder().append(TableName).append(".").append(KeyColumn);
MLookupInfo lInfo = new MLookupInfo(realSQL.toString(), TableName, MLookupInfo lInfo = new MLookupInfo(realSQL.toString(), TableName,
msginf.toString(), ZoomWindow, ZoomWindowPO, zoomQuery); msginf.toString(), ZoomWindow, ZoomWindowPO, zoomQuery);

View File

@ -108,7 +108,7 @@ public class MOrderLine extends X_C_OrderLine
if (retValue == null) if (retValue == null)
s_log.fine("-"); s_log.fine("-");
else else
s_log.fine(retValue.toString()); if (s_log.isLoggable(Level.FINE)) s_log.fine(retValue.toString());
return retValue; return retValue;
} // getNotReserved } // getNotReserved

View File

@ -101,7 +101,7 @@ public class MOrderTax extends X_C_OrderTax
{ {
retValue.setPrecision(precision); retValue.setPrecision(precision);
retValue.set_TrxName(trxName); retValue.set_TrxName(trxName);
s_log.fine("(old=" + oldTax + ") " + retValue); if (s_log.isLoggable(Level.FINE)) s_log.fine("(old=" + oldTax + ") " + retValue);
return retValue; return retValue;
} }
// If the old tax was required and there is no MOrderTax for that // If the old tax was required and there is no MOrderTax for that
@ -119,7 +119,7 @@ public class MOrderTax extends X_C_OrderTax
retValue.setC_Tax_ID(line.getC_Tax_ID()); retValue.setC_Tax_ID(line.getC_Tax_ID());
retValue.setPrecision(precision); retValue.setPrecision(precision);
retValue.setIsTaxIncluded(line.isTaxIncluded()); retValue.setIsTaxIncluded(line.isTaxIncluded());
s_log.fine("(new) " + retValue); if (s_log.isLoggable(Level.FINE)) s_log.fine("(new) " + retValue);
return retValue; return retValue;
} // get } // get

View File

@ -202,7 +202,7 @@ public final class MPaySelectionCheck extends X_C_PaySelectionCheck
static public MPaySelectionCheck[] get (int C_PaySelection_ID, static public MPaySelectionCheck[] get (int C_PaySelection_ID,
String PaymentRule, int startDocumentNo, String trxName) String PaymentRule, int startDocumentNo, String trxName)
{ {
s_log.fine("C_PaySelection_ID=" + C_PaySelection_ID if (s_log.isLoggable(Level.FINE)) s_log.fine("C_PaySelection_ID=" + C_PaySelection_ID
+ ", PaymentRule=" + PaymentRule + ", startDocumentNo=" + startDocumentNo); + ", PaymentRule=" + PaymentRule + ", startDocumentNo=" + startDocumentNo);
ArrayList<MPaySelectionCheck> list = new ArrayList<MPaySelectionCheck>(); ArrayList<MPaySelectionCheck> list = new ArrayList<MPaySelectionCheck>();
@ -300,11 +300,11 @@ public final class MPaySelectionCheck extends X_C_PaySelectionCheck
} }
// Link to Invoice // Link to Invoice
MPaySelectionLine[] psls = check.getPaySelectionLines(false); MPaySelectionLine[] psls = check.getPaySelectionLines(false);
s_log.fine("confirmPrint - " + check + " (#SelectionLines=" + psls.length + ")"); if (s_log.isLoggable(Level.FINE)) s_log.fine("confirmPrint - " + check + " (#SelectionLines=" + psls.length + ")");
if (check.getQty() == 1 && psls != null && psls.length == 1) if (check.getQty() == 1 && psls != null && psls.length == 1)
{ {
MPaySelectionLine psl = psls[0]; MPaySelectionLine psl = psls[0];
s_log.fine("Map to Invoice " + psl); if (s_log.isLoggable(Level.FINE)) s_log.fine("Map to Invoice " + psl);
// //
payment.setC_Invoice_ID (psl.getC_Invoice_ID()); payment.setC_Invoice_ID (psl.getC_Invoice_ID());
payment.setDiscountAmt (psl.getDiscountAmt()); payment.setDiscountAmt (psl.getDiscountAmt());
@ -352,7 +352,7 @@ public final class MPaySelectionCheck extends X_C_PaySelectionCheck
s_log.log(Level.SEVERE, "Check not saved: " + check); s_log.log(Level.SEVERE, "Check not saved: " + check);
} // all checks } // all checks
s_log.fine("Last Document No = " + lastDocumentNo); if (s_log.isLoggable(Level.FINE)) s_log.fine("Last Document No = " + lastDocumentNo);
return lastDocumentNo; return lastDocumentNo;
} // confirmPrint } // confirmPrint

View File

@ -18,6 +18,7 @@ package org.compiere.model;
import java.util.Calendar; import java.util.Calendar;
import java.util.StringTokenizer; import java.util.StringTokenizer;
import java.util.logging.Level;
import org.compiere.util.CLogger; import org.compiere.util.CLogger;
@ -185,7 +186,7 @@ public class MPaymentValidate
if (sum % 10 == 0) if (sum % 10 == 0)
return ""; return "";
s_log.fine("validateCreditCardNumber - " + creditCardNumber + " -> " if (s_log.isLoggable(Level.FINE)) s_log.fine("validateCreditCardNumber - " + creditCardNumber + " -> "
+ ccNumber + ", Luhn=" + sum); + ccNumber + ", Luhn=" + sum);
return "CreditCardNumberError"; return "CreditCardNumberError";
} // validateCreditCardNumber } // validateCreditCardNumber
@ -263,7 +264,7 @@ public class MPaymentValidate
} }
if (!ccLengthOK) if (!ccLengthOK)
{ {
s_log.fine("validateCreditCardNumber Length=" if (s_log.isLoggable(Level.FINE)) s_log.fine("validateCreditCardNumber Length="
+ ccLength + " <> " + ccLengthList); + ccLength + " <> " + ccLengthList);
return "CreditCardNumberError"; return "CreditCardNumberError";
} }
@ -279,7 +280,7 @@ public class MPaymentValidate
ccIdentified = true; ccIdentified = true;
} }
if (!ccIdentified) if (!ccIdentified)
s_log.fine("validateCreditCardNumber Type=" if (s_log.isLoggable(Level.FINE)) s_log.fine("validateCreditCardNumber Type="
+ creditCardType + " <> " + ccStartList); + creditCardType + " <> " + ccStartList);
// //
@ -311,9 +312,9 @@ public class MPaymentValidate
} }
catch (NumberFormatException ex) catch (NumberFormatException ex)
{ {
s_log.fine("validateCreditCardVV - " + ex); if (s_log.isLoggable(Level.FINE)) s_log.fine("validateCreditCardVV - " + ex);
} }
s_log.fine("validateCreditCardVV - length=" + length); if (s_log.isLoggable(Level.FINE)) s_log.fine("validateCreditCardVV - length=" + length);
return "CreditCardVVError"; return "CreditCardVVError";
} // validateCreditCardVV } // validateCreditCardVV
@ -344,10 +345,10 @@ public class MPaymentValidate
} }
catch (NumberFormatException ex) catch (NumberFormatException ex)
{ {
s_log.fine("validateCreditCardVV - " + ex); if (s_log.isLoggable(Level.FINE)) s_log.fine("validateCreditCardVV - " + ex);
} }
} }
s_log.fine("validateCreditCardVV(4) CC=" + creditCardType + ", length=" + length); if (s_log.isLoggable(Level.FINE)) s_log.fine("validateCreditCardVV(4) CC=" + creditCardType + ", length=" + length);
return "CreditCardVVError"; return "CreditCardVVError";
} }
// Visa & MasterCard - 3 digits // Visa & MasterCard - 3 digits
@ -363,10 +364,10 @@ public class MPaymentValidate
} }
catch (NumberFormatException ex) catch (NumberFormatException ex)
{ {
s_log.fine("validateCreditCardVV - " + ex); if (s_log.isLoggable(Level.FINE)) s_log.fine("validateCreditCardVV - " + ex);
} }
} }
s_log.fine("validateCreditCardVV(3) CC=" + creditCardType + ", length=" + length); if (s_log.isLoggable(Level.FINE)) s_log.fine("validateCreditCardVV(3) CC=" + creditCardType + ", length=" + length);
return "CreditCardVVError"; return "CreditCardVVError";
} }

View File

@ -101,7 +101,7 @@ public class MProductCategory extends X_M_Product_Category
// TODO: LRU logic // TODO: LRU logic
s_products.put(product, category); s_products.put(product, category);
// //
s_log.fine("M_Product_ID=" + M_Product_ID + "(" + category if (s_log.isLoggable(Level.FINE)) s_log.fine("M_Product_ID=" + M_Product_ID + "(" + category
+ ") in M_Product_Category_ID=" + M_Product_Category_ID + ") in M_Product_Category_ID=" + M_Product_Category_ID
+ " - " + (category.intValue() == M_Product_Category_ID)); + " - " + (category.intValue() == M_Product_Category_ID));
return category.intValue() == M_Product_Category_ID; return category.intValue() == M_Product_Category_ID;

View File

@ -139,7 +139,7 @@ public class MQuery implements Serializable
String Name = rs.getString(10); String Name = rs.getString(10);
boolean isRange = "Y".equals(rs.getString(11)); boolean isRange = "Y".equals(rs.getString(11));
// //
s_log.fine(ParameterName + " S=" + P_String + "-" + P_String_To if (s_log.isLoggable(Level.FINE)) s_log.fine(ParameterName + " S=" + P_String + "-" + P_String_To
+ ", N=" + P_Number + "-" + P_Number_To + ", D=" + P_Date + "-" + P_Date_To + ", N=" + P_Number + "-" + P_Number_To + ", D=" + P_Date + "-" + P_Date_To
+ "; Name=" + Name + ", Info=" + Info + "-" + Info_To + ", Range=" + isRange); + "; Name=" + Name + ", Info=" + Info + "-" + Info_To + ", Range=" + isRange);
// //

View File

@ -96,7 +96,7 @@ public class MRMATax extends X_M_RMATax
{ {
retValue.setPrecision(precision); retValue.setPrecision(precision);
retValue.set_TrxName(trxName); retValue.set_TrxName(trxName);
s_log.fine("(old=" + oldTax + ") " + retValue); if (s_log.isLoggable(Level.FINE)) s_log.fine("(old=" + oldTax + ") " + retValue);
return retValue; return retValue;
} }
// If the old tax was required and there is no MOrderTax for that // If the old tax was required and there is no MOrderTax for that
@ -114,7 +114,7 @@ public class MRMATax extends X_M_RMATax
retValue.setC_Tax_ID(line.getC_Tax_ID()); retValue.setC_Tax_ID(line.getC_Tax_ID());
retValue.setPrecision(precision); retValue.setPrecision(precision);
retValue.setIsTaxIncluded(line.getParent().isTaxIncluded()); retValue.setIsTaxIncluded(line.getParent().isTaxIncluded());
s_log.fine("(new) " + retValue); if (s_log.isLoggable(Level.FINE)) s_log.fine("(new) " + retValue);
return retValue; return retValue;
} }

View File

@ -81,7 +81,7 @@ public final class MRegion extends X_C_Region
rs = null; rs = null;
stmt = null; stmt = null;
} }
s_log.fine(s_regions.size() + " - default=" + s_default); if (s_log.isLoggable(Level.FINE)) s_log.fine(s_regions.size() + " - default=" + s_default);
} // loadAllRegions } // loadAllRegions
/** /**

View File

@ -449,7 +449,7 @@ public class MSequence extends X_AD_Sequence
// + " - Type=" + pstmt.getResultSetType() + " - Concur=" + pstmt.getResultSetConcurrency()); // + " - Type=" + pstmt.getResultSetType() + " - Concur=" + pstmt.getResultSetConcurrency());
if (rs.next()) if (rs.next())
{ {
s_log.fine("AD_Sequence_ID="+AD_Sequence_ID); if (s_log.isLoggable(Level.FINE)) s_log.fine("AD_Sequence_ID="+AD_Sequence_ID);
PreparedStatement updateSQL = null; PreparedStatement updateSQL = null;
try try
@ -656,7 +656,7 @@ public class MSequence extends X_AD_Sequence
while (rs.next()) while (rs.next())
{ {
String tableName = rs.getString(1); String tableName = rs.getString(1);
s_log.fine("Add: " + tableName); if (s_log.isLoggable(Level.FINE)) s_log.fine("Add: " + tableName);
MSequence seq = new MSequence (ctx, AD_Client_ID, tableName, trxName); MSequence seq = new MSequence (ctx, AD_Client_ID, tableName, trxName);
if (seq.save()) if (seq.save())
counter++; counter++;

View File

@ -67,10 +67,10 @@ public class MStorageOnHand extends X_M_StorageOnHand
.first(); .first();
if (retValue == null) if (retValue == null)
s_log.fine("Not Found - M_Locator_ID=" + M_Locator_ID if (s_log.isLoggable(Level.FINE)) s_log.fine("Not Found - M_Locator_ID=" + M_Locator_ID
+ ", M_Product_ID=" + M_Product_ID + ", M_AttributeSetInstance_ID=" + M_AttributeSetInstance_ID); + ", M_Product_ID=" + M_Product_ID + ", M_AttributeSetInstance_ID=" + M_AttributeSetInstance_ID);
else else
s_log.fine("M_Locator_ID=" + M_Locator_ID if (s_log.isLoggable(Level.FINE)) s_log.fine("M_Locator_ID=" + M_Locator_ID
+ ", M_Product_ID=" + M_Product_ID + ", M_AttributeSetInstance_ID=" + M_AttributeSetInstance_ID); + ", M_Product_ID=" + M_Product_ID + ", M_AttributeSetInstance_ID=" + M_AttributeSetInstance_ID);
return retValue; return retValue;
} // get } // get
@ -339,7 +339,7 @@ public class MStorageOnHand extends X_M_StorageOnHand
// //
retValue = new MStorageOnHand (locator, M_Product_ID, M_AttributeSetInstance_ID); retValue = new MStorageOnHand (locator, M_Product_ID, M_AttributeSetInstance_ID);
retValue.saveEx(trxName); retValue.saveEx(trxName);
s_log.fine("New " + retValue); if (s_log.isLoggable(Level.FINE)) s_log.fine("New " + retValue);
return retValue; return retValue;
} // getCreate } // getCreate
@ -380,7 +380,7 @@ public class MStorageOnHand extends X_M_StorageOnHand
storage.setQtyOnHand (storage.getQtyOnHand().add (diffQtyOnHand)); storage.setQtyOnHand (storage.getQtyOnHand().add (diffQtyOnHand));
if (s_log.isLoggable(Level.FINE)) { if (s_log.isLoggable(Level.FINE)) {
StringBuilder diffText = new StringBuilder("(OnHand=").append(diffQtyOnHand).append(") -> ").append(storage.toString()); StringBuilder diffText = new StringBuilder("(OnHand=").append(diffQtyOnHand).append(") -> ").append(storage.toString());
s_log.fine(diffText.toString()); if (s_log.isLoggable(Level.FINE)) s_log.fine(diffText.toString());
} }
return storage.save (trxName); return storage.save (trxName);
} // add } // add

View File

@ -75,10 +75,10 @@ public class MStorageReservation extends X_M_StorageReservation {
rs = null; pstmt = null; rs = null; pstmt = null;
} }
if (retValue == null) if (retValue == null)
s_log.fine("Not Found - M_Warehouse_ID=" + M_Warehouse_ID if (s_log.isLoggable(Level.FINE)) s_log.fine("Not Found - M_Warehouse_ID=" + M_Warehouse_ID
+ ", M_Product_ID=" + M_Product_ID + ", M_AttributeSetInstance_ID=" + M_AttributeSetInstance_ID + ", IsSOTrx=" + isSOTrx); + ", M_Product_ID=" + M_Product_ID + ", M_AttributeSetInstance_ID=" + M_AttributeSetInstance_ID + ", IsSOTrx=" + isSOTrx);
else else
s_log.fine("M_Warehouse_ID=" + M_Warehouse_ID if (s_log.isLoggable(Level.FINE)) s_log.fine("M_Warehouse_ID=" + M_Warehouse_ID
+ ", M_Product_ID=" + M_Product_ID + ", M_AttributeSetInstance_ID=" + M_AttributeSetInstance_ID + ", IsSOTrx=" + isSOTrx); + ", M_Product_ID=" + M_Product_ID + ", M_AttributeSetInstance_ID=" + M_AttributeSetInstance_ID + ", IsSOTrx=" + isSOTrx);
return retValue; return retValue;
} // get } // get
@ -257,7 +257,7 @@ public class MStorageReservation extends X_M_StorageReservation {
storage.setQty (storage.getQty().add(diffQty)); storage.setQty (storage.getQty().add(diffQty));
if (s_log.isLoggable(Level.FINE)) { if (s_log.isLoggable(Level.FINE)) {
StringBuilder diffText = new StringBuilder("(Qty=").append(diffQty).append(") -> ").append(storage.toString()); StringBuilder diffText = new StringBuilder("(Qty=").append(diffQty).append(") -> ").append(storage.toString());
s_log.fine(diffText.toString()); if (s_log.isLoggable(Level.FINE)) s_log.fine(diffText.toString());
} }
return storage.save (trxName); return storage.save (trxName);
} // add } // add
@ -289,7 +289,7 @@ public class MStorageReservation extends X_M_StorageReservation {
// //
retValue = new MStorageReservation (warehouse, M_Product_ID, M_AttributeSetInstance_ID, isSOTrx); retValue = new MStorageReservation (warehouse, M_Product_ID, M_AttributeSetInstance_ID, isSOTrx);
retValue.saveEx(trxName); retValue.saveEx(trxName);
s_log.fine("New " + retValue); if (s_log.isLoggable(Level.FINE)) s_log.fine("New " + retValue);
return retValue; return retValue;
} // getCreate } // getCreate

View File

@ -533,7 +533,7 @@ public class MUOMConversion extends X_C_UOM_Conversion
if (qtyPrice == null || qtyPrice.compareTo(Env.ZERO)==0 if (qtyPrice == null || qtyPrice.compareTo(Env.ZERO)==0
|| C_UOM_To_ID == 0|| M_Product_ID == 0) || C_UOM_To_ID == 0|| M_Product_ID == 0)
{ {
s_log.fine("No Conversion - QtyPrice=" + qtyPrice); if (s_log.isLoggable(Level.FINE)) s_log.fine("No Conversion - QtyPrice=" + qtyPrice);
return qtyPrice; return qtyPrice;
} }
@ -547,7 +547,7 @@ public class MUOMConversion extends X_C_UOM_Conversion
return uom.round(retValue.multiply(qtyPrice), true); return uom.round(retValue.multiply(qtyPrice), true);
return retValue.multiply(qtyPrice); return retValue.multiply(qtyPrice);
} }
s_log.fine("No Rate M_Product_ID=" + M_Product_ID); if (s_log.isLoggable(Level.FINE)) s_log.fine("No Rate M_Product_ID=" + M_Product_ID);
return null; return null;
} // convertProductFrom } // convertProductFrom
@ -613,7 +613,7 @@ public class MUOMConversion extends X_C_UOM_Conversion
result = new MUOMConversion[list.size ()]; result = new MUOMConversion[list.size ()];
list.toArray (result); list.toArray (result);
s_conversionProduct.put(key, result); s_conversionProduct.put(key, result);
s_log.fine("getProductConversions - M_Product_ID=" + M_Product_ID + " #" + result.length); if (s_log.isLoggable(Level.FINE)) s_log.fine("getProductConversions - M_Product_ID=" + M_Product_ID + " #" + result.length);
return result; return result;
} // getProductConversions } // getProductConversions

View File

@ -90,7 +90,7 @@ public class MWarehousePrice extends X_RV_WarehousePrice
// //
String finalSQL = MRole.getDefault().addAccessSQL(sql.toString(), String finalSQL = MRole.getDefault().addAccessSQL(sql.toString(),
"RV_WarehousePrice", MRole.SQL_NOTQUALIFIED, MRole.SQL_RO); "RV_WarehousePrice", MRole.SQL_NOTQUALIFIED, MRole.SQL_RO);
s_log.fine("find - M_PriceList_Version_ID=" + M_PriceList_Version_ID if (s_log.isLoggable(Level.FINE)) s_log.fine("find - M_PriceList_Version_ID=" + M_PriceList_Version_ID
+ ", M_Warehouse_ID=" + M_Warehouse_ID + ", M_Warehouse_ID=" + M_Warehouse_ID
+ " - " + finalSQL); + " - " + finalSQL);
ArrayList<MWarehousePrice> list = new ArrayList<MWarehousePrice>(); ArrayList<MWarehousePrice> list = new ArrayList<MWarehousePrice>();
@ -125,7 +125,7 @@ public class MWarehousePrice extends X_RV_WarehousePrice
pstmt = null; pstmt = null;
} }
// //
s_log.fine("find - #" + list.size()); if (s_log.isLoggable(Level.FINE)) s_log.fine("find - #" + list.size());
MWarehousePrice[] retValue = new MWarehousePrice[list.size()]; MWarehousePrice[] retValue = new MWarehousePrice[list.size()];
list.toArray(retValue); list.toArray(retValue);
return retValue; return retValue;

View File

@ -1238,7 +1238,7 @@ public abstract class PO
*/ */
public static void copyValues (PO from, PO to) public static void copyValues (PO from, PO to)
{ {
s_log.fine("From ID=" + from.get_ID() + " - To ID=" + to.get_ID()); if (s_log.isLoggable(Level.FINE)) s_log.fine("From ID=" + from.get_ID() + " - To ID=" + to.get_ID());
// Different Classes // Different Classes
if (from.getClass() != to.getClass()) if (from.getClass() != to.getClass())
{ {