Merge f45f50571e52

This commit is contained in:
Heng Sin Low 2013-02-25 21:18:12 +08:00
commit 6ae0aaaa82
77 changed files with 258 additions and 245 deletions

View File

@ -0,0 +1,8 @@
-- Feb 22, 2013 3:02:16 PM COT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_InfoColumn SET IsDisplayed='N',Updated=TO_DATE('2013-02-22 15:02:16','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_InfoColumn_ID=200061
;
SELECT register_migration_script('201302221504_IDEMPIERE-325.sql') FROM dual
;

View File

@ -644,4 +644,4 @@ UPDATE AD_Process_Para SET DefaultValue='@IsPriviledgedRate@',Updated=TO_DATE('2
;
SELECT register_migration_script('201302221708_TICKET-1001758.sql') FROM dual
;
;

View File

@ -0,0 +1,8 @@
-- Feb 22, 2013 3:02:16 PM COT
-- IDEMPIERE-325 Complete AD based info window ( AD_InfoWindow ) implementation
UPDATE AD_InfoColumn SET IsDisplayed='N',Updated=TO_TIMESTAMP('2013-02-22 15:02:16','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_InfoColumn_ID=200061
;
SELECT register_migration_script('201302221504_IDEMPIERE-325.sql') FROM dual
;

View File

@ -644,4 +644,4 @@ UPDATE AD_Process_Para SET DefaultValue='@IsPriviledgedRate@',Updated=TO_TIMESTA
;
SELECT register_migration_script('201302221708_TICKET-1001758.sql') FROM dual
;
;

View File

@ -71,7 +71,7 @@ public class DocumentTypeVerify extends SvrProcess
public static void createDocumentTypes(Properties ctx, int AD_Client_ID,
SvrProcess sp, String trxName)
{
s_log.info("AD_Client_ID=" + AD_Client_ID);
if (s_log.isLoggable(Level.INFO)) s_log.info("AD_Client_ID=" + AD_Client_ID);
String sql = "SELECT rl.Value, rl.Name "
+ "FROM AD_Ref_List rl "
+ "WHERE rl.AD_Reference_ID=183"
@ -129,7 +129,7 @@ public class DocumentTypeVerify extends SvrProcess
public static void createPeriodControls(Properties ctx, int AD_Client_ID,
SvrProcess sp, String trxName)
{
s_log.info("AD_Client_ID=" + AD_Client_ID);
if (s_log.isLoggable(Level.INFO)) s_log.info("AD_Client_ID=" + AD_Client_ID);
// Delete Duplicates
String sql = "DELETE C_PeriodControl pc1 "
@ -143,7 +143,7 @@ public class DocumentTypeVerify extends SvrProcess
+ "FROM C_PeriodControl pc3 "
+ "GROUP BY C_Period_ID, DocBaseType)";
int no = DB.executeUpdate(sql, false, trxName);
s_log.info("Duplicates deleted #" + no);
if (s_log.isLoggable(Level.INFO)) s_log.info("Duplicates deleted #" + no);
// Insert Missing
sql = "SELECT DISTINCT p.AD_Client_ID, p.C_Period_ID, dt.DocBaseType "
@ -174,7 +174,7 @@ public class DocumentTypeVerify extends SvrProcess
if (pc.save())
{
counter++;
s_log.fine(pc.toString());
if (s_log.isLoggable(Level.FINE)) s_log.fine(pc.toString());
}
else
s_log.warning("Not saved: " + pc);
@ -192,7 +192,7 @@ public class DocumentTypeVerify extends SvrProcess
}
if (sp != null)
sp.addLog (0, null, new BigDecimal(counter), "@C_PeriodControl_ID@ @Created@");
s_log.info("Inserted #" + counter);
if (s_log.isLoggable(Level.INFO)) s_log.info("Inserted #" + counter);
} // createPeriodControls
} // DocumentTypeVerify

View File

@ -147,7 +147,7 @@ public class SequenceCheck extends SvrProcess
sp.addLog(0, null, null,msglog.toString());
}
else
s_log.fine("Sync #" + no);
if (s_log.isLoggable(Level.FINE)) s_log.fine("Sync #" + no);
}
if (no >= 0)
return;
@ -194,7 +194,7 @@ public class SequenceCheck extends SvrProcess
if (IDRangeEnd <= 0)
IDRangeEnd = DB.getSQLValue(null,
"SELECT MIN(IDRangeStart)-1 FROM AD_Replication");
s_log.info("IDRangeEnd = " + IDRangeEnd);
if (s_log.isLoggable(Level.INFO)) s_log.info("IDRangeEnd = " + IDRangeEnd);
//
String sql = "SELECT * FROM AD_Sequence "
+ "WHERE IsTableID='Y' "
@ -239,7 +239,7 @@ public class SequenceCheck extends SvrProcess
DB.close(rs, pstmt);
rs = null; pstmt = null;
}
s_log.fine("#" + counter);
if (s_log.isLoggable(Level.FINE)) s_log.fine("#" + counter);
} // checkTableID

View File

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

View File

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

View File

@ -13,6 +13,8 @@
*****************************************************************************/
package org.adempiere.exceptions;
import java.util.logging.Level;
import org.adempiere.exceptions.AdempiereException;
import org.compiere.model.PO;
import org.compiere.util.CLogger;
@ -68,7 +70,7 @@ public class PORelationException extends AdempiereException {
public static void throwWrongKeyColumnCount(final PO po) {
logger.fine("Invoked with po " + po);
if (logger.isLoggable(Level.FINE)) logger.fine("Invoked with po " + po);
final Object[] msgParams = new Object[] { po.toString(),
po.get_KeyColumns().length };

View File

@ -26,6 +26,7 @@ import java.util.HashSet;
import java.util.List;
import java.util.Properties;
import java.util.Set;
import java.util.logging.Level;
import org.adempiere.exceptions.AdempiereException;
import org.adempiere.exceptions.PORelationException;
@ -143,7 +144,7 @@ public class MRelationType extends X_AD_RelationType implements IZoomProvider {
final List<MRelationType> result = evalResultSet(po, windowId, rs);
logger.info("There are " + result.size() + " matching types for "
if (logger.isLoggable(Level.INFO)) logger.info("There are " + result.size() + " matching types for "
+ po);
return result;
@ -294,7 +295,7 @@ public class MRelationType extends X_AD_RelationType implements IZoomProvider {
parsedWhere, po.get_TrxName()).first();
final boolean match = result != null;
logger.fine("whereClause='" + parsedWhere + "' matches po='" + po
if (logger.isLoggable(Level.FINE)) logger.fine("whereClause='" + parsedWhere + "' matches po='" + po
+ "':" + match);
return match;
}
@ -328,7 +329,7 @@ public class MRelationType extends X_AD_RelationType implements IZoomProvider {
final String parsedWhere = Env.parseContext(privateCtx, -1, where,
false);
logger.fine("whereClause='" + where + "'; parsedWhere='" + parsedWhere
if (logger.isLoggable(Level.FINE)) logger.fine("whereClause='" + where + "'; parsedWhere='" + parsedWhere
+ "'");
return parsedWhere;

View File

@ -17,6 +17,7 @@ import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.logging.Level;
import org.compiere.model.MQuery;
import org.compiere.model.PO;
@ -83,7 +84,7 @@ public class ZoomInfoFactory {
public static List<ZoomInfoFactory.ZoomInfo> retrieveZoomInfos(final PO po,
final int windowID) {
logger.config("PO=" + po + " - AD_Window_ID=" + windowID);
if (logger.isLoggable(Level.CONFIG)) logger.config("PO=" + po + " - AD_Window_ID=" + windowID);
final List<ZoomInfoFactory.ZoomInfo> result = new ArrayList<ZoomInfoFactory.ZoomInfo>();
@ -94,7 +95,7 @@ public class ZoomInfoFactory {
if (alreadySeen.add(zoomInfo.destinationDisplay)) {
logger.fine("Adding zoomInfo " + zoomInfo);
if (logger.isLoggable(Level.FINE)) logger.fine("Adding zoomInfo " + zoomInfo);
result.add(zoomInfo);
}
}
@ -106,13 +107,13 @@ public class ZoomInfoFactory {
if (alreadySeen.add(zoomInfo.destinationDisplay)) {
logger.fine("Adding zoomInfo " + zoomInfo + " from "
if (logger.isLoggable(Level.FINE)) logger.fine("Adding zoomInfo " + zoomInfo + " from "
+ GenericZoomProvider.class.getSimpleName());
result.add(zoomInfo);
} else {
logger.fine("Skipping zoomInfo " + zoomInfo + " from "
if (logger.isLoggable(Level.FINE)) logger.fine("Skipping zoomInfo " + zoomInfo + " from "
+ GenericZoomProvider.class.getSimpleName()
+ " because there is already one for destination '"
+ zoomInfo.destinationDisplay + "'");

View File

@ -556,7 +556,7 @@ public class Doc_Order extends Doc
if (!tax.isZeroTax())
{
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);
BigDecimal PriceListTax = tax.calculateTax(PriceList, true, precision);
PriceList = PriceList.subtract(PriceListTax);
@ -697,7 +697,7 @@ public class Doc_Order extends Doc
if (!tax.isZeroTax())
{
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);
BigDecimal PriceListTax = tax.calculateTax(PriceList, true, precision);
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);
return null;
}
s_log.fine("New: " + newAccount);
if (s_log.isLoggable(Level.FINE)) s_log.fine("New: " + newAccount);
return newAccount;
} // get
@ -330,7 +330,7 @@ public class MAccount extends X_C_ValidCombination
else if (elementType.equals(MAcctSchemaElement.ELEMENTTYPE_UserElement2) && setValue)
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()
+ " - AcctSchema_ID=" + vc.getC_AcctSchema_ID() + ", Account_ID=" + vc.getAccount_ID());
return vc;

View File

@ -60,7 +60,7 @@ public final class MAcctSchemaElement extends X_C_AcctSchema_Element
if (retValue != null)
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>();
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)
{
s_log.fine(" - " + ase);
if (s_log.isLoggable(Level.FINE)) s_log.fine(" - " + ase);
if (ase.isMandatory() && ase.getDefaultValue() == 0)
s_log.log(Level.SEVERE, "No default value for " + ase.getName());
list.add(ase);

View File

@ -76,7 +76,7 @@ public class MArchive extends X_AD_Archive {
if (list.size() == 0)
s_log.fine(sql.toString());
else
s_log.finer(sql.toString());
if (s_log.isLoggable(Level.FINER)) s_log.finer(sql.toString());
//
MArchive[] retValue = new MArchive[list.size()];
list.toArray(retValue);

View File

@ -6,13 +6,13 @@ import java.sql.ResultSet;
import java.sql.Timestamp;
import java.util.List;
import java.util.Properties;
import java.util.logging.Level;
import org.adempiere.exceptions.FillMandatoryException;
import org.compiere.process.DocAction;
import org.compiere.process.DocumentEngine;
import org.compiere.process.ProcessInfo;
import org.compiere.process.ProjectClose;
import org.compiere.util.CLogMgt;
import org.compiere.util.CLogger;
import org.compiere.util.DB;
import org.compiere.util.Env;
@ -35,11 +35,11 @@ import org.idempiere.fa.util.POCacheLocal;
public class MAssetAddition extends X_A_Asset_Addition
implements DocAction
{
/**
*
*/
private static final long serialVersionUID = 5977180589101094202L;
/** Static Logger */
private static CLogger s_log = CLogger.getCLogger(MAssetAddition.class);
@ -386,7 +386,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"
+ " C_Invoice_ID"
@ -435,7 +435,7 @@ public class MAssetAddition extends X_A_Asset_Addition
*/
SetGetUtil.updateColumns(model, null, query, trxName);
if(CLogMgt.isLevelFine()) s_log.fine("Leaving: RETURN TRUE");
s_log.fine("Leaving: RETURN TRUE");
return true;
}

View File

@ -15,6 +15,7 @@ package org.compiere.model;
import java.sql.ResultSet;
import java.util.Properties;
import java.util.logging.Level;
import org.compiere.model.MRefList;
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) {
s_log.fine("Entering: changeType=" + changeType);
if (s_log.isLoggable(Level.FINE)) s_log.fine("Entering: changeType=" + changeType);
if (pos == null || pos.length == 0) {
s_log.fine("Entering/Leaving: POs is empty");
return null;
@ -117,7 +118,7 @@ public class MAssetChange extends X_A_Asset_Change
change.saveEx();
}
//
s_log.fine("Leaving: change=" + change);
if (s_log.isLoggable(Level.FINE)) s_log.fine("Leaving: change=" + change);
return change;
}

View File

@ -21,6 +21,7 @@ import java.sql.ResultSet;
import java.util.ArrayList;
import java.util.List;
import java.util.Properties;
import java.util.logging.Level;
import org.compiere.util.CLogger;
import org.compiere.util.DB;
@ -74,7 +75,7 @@ public class MAttribute extends X_M_Attribute
MAttribute[] retValue = new MAttribute[list.size ()];
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;
} // getOfClient

View File

@ -61,11 +61,11 @@ public class MAttributeSetInstance extends X_M_AttributeSetInstance
// Load Instance if not 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);
}
// 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)
return null;
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
+ ", C_Currency_ID=" + C_Currency_ID + ", Amt=" + Amt);
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);
MBankAccountProcessor[] retValue = new MBankAccountProcessor[list.size()];
list.toArray(retValue);

View File

@ -90,7 +90,7 @@ public class MChangeLog extends X_AD_ChangeLog
Integer id = (Integer)list.get(i);
s_changeLog[i] = id.intValue();
}
s_log.info("#" + s_changeLog.length);
if (s_log.isLoggable(Level.INFO)) s_log.info("#" + s_changeLog.length);
} // fillChangeLog
/** Change Log */

View File

@ -19,6 +19,7 @@ package org.compiere.model;
import java.sql.ResultSet;
import java.sql.Timestamp;
import java.util.Properties;
import java.util.logging.Level;
import org.compiere.util.CLogger;
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,
isActive, trxName);
s_log.fine("NOT found - " + retValue);
if (s_log.isLoggable(Level.FINE)) s_log.fine("NOT found - " + retValue);
}
else
s_log.fine("Found - " + retValue);
if (s_log.isLoggable(Level.FINE)) s_log.fine("Found - " + retValue);
return retValue;
} // get

View File

@ -251,7 +251,7 @@ public class MConversionRate extends X_C_Conversion_Rate
pstmt = null;
}
if (retValue == null)
s_log.info ("getRate - not found - CurFrom=" + CurFrom_ID
if (s_log.isLoggable(Level.INFO)) s_log.info ("getRate - not found - CurFrom=" + CurFrom_ID
+ ", CurTo=" + CurTo_ID
+ ", " + ConvDate
+ ", Type=" + ConversionType_ID + (ConversionType_ID==C_ConversionType_ID ? "" : "->" + C_ConversionType_ID)

View File

@ -6,8 +6,8 @@ package org.compiere.model;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.sql.Timestamp;
import java.util.logging.Level;
import org.compiere.util.CLogMgt;
import org.compiere.util.CLogger;
import org.compiere.util.Env;
import org.idempiere.exceptions.NoCurrencyConversionException;
@ -97,7 +97,7 @@ public final class MConversionRateUtil
if (AmtName != null)
model.set_AttrValue(AmtName, 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;
} // convert
}

View File

@ -221,7 +221,7 @@ public class MCost extends X_M_Cost
// Standard costs - just Material Costs
if (MCostElement.COSTINGMETHOD_StandardCosting.equals(costingMethod))
{
s_log.finer("MaterialCosts = " + materialCost);
if (s_log.isLoggable(Level.FINER)) s_log.finer("MaterialCosts = " + materialCost);
return materialCost;
}
if (MCostElement.COSTINGMETHOD_Fifo.equals(costingMethod)
@ -240,7 +240,7 @@ public class MCost extends X_M_Cost
if (costs.signum() == 0)
return null;
s_log.finer("Sum Costs = " + costs);
if (s_log.isLoggable(Level.FINER)) s_log.finer("Sum Costs = " + costs);
int precision = as.getCostingPrecision();
if (percentage.signum() == 0) // no percentages
{
@ -254,7 +254,7 @@ public class MCost extends X_M_Cost
costs = costs.add(percentCost);
if (costs.scale() > precision)
costs = costs.setScale(precision, BigDecimal.ROUND_HALF_UP);
s_log.finer("Sum Costs = " + costs + " (Add=" + percentCost + ")");
if (s_log.isLoggable(Level.FINER)) s_log.finer("Sum Costs = " + costs + " (Add=" + percentCost + ")");
return costs;
} // getCurrentCost
@ -296,7 +296,7 @@ public class MCost extends X_M_Cost
throw new IllegalArgumentException("Unknown Costing Method = " + costingMethod);
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;
}
@ -306,7 +306,7 @@ public class MCost extends X_M_Cost
retValue = getPOPrice(product, C_OrderLine_ID, as.getC_Currency_ID());
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;
}
}
@ -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());
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();
}
}
@ -334,7 +334,7 @@ public class MCost extends X_M_Cost
retValue = getLastPOPrice(product, M_ASI_ID, 0, as.getC_Currency_ID());
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;
}
}
@ -346,7 +346,7 @@ public class MCost extends X_M_Cost
retValue = getLastInvoicePrice(product, M_ASI_ID, 0, as.getC_Currency_ID());
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;
}
}
@ -362,7 +362,7 @@ public class MCost extends X_M_Cost
retValue = getLastInvoicePrice(product, M_ASI_ID, 0, as.getC_Currency_ID());
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;
}
}
@ -374,7 +374,7 @@ public class MCost extends X_M_Cost
retValue = getLastPOPrice(product, M_ASI_ID, 0, as.getC_Currency_ID());
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;
}
}
@ -402,7 +402,7 @@ public class MCost extends X_M_Cost
if (price != null && price.signum() != 0)
{
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;
}
}
@ -415,7 +415,7 @@ public class MCost extends X_M_Cost
retValue = price;
}
s_log.fine(product.getName() + " = " + retValue);
if (s_log.isLoggable(Level.FINE)) s_log.fine(product.getName() + " = " + retValue);
return retValue;
} // getSeedCosts
@ -502,7 +502,7 @@ public class MCost extends X_M_Cost
if (retValue != null)
{
s_log.finer(product.getName() + " = " + retValue);
if (s_log.isLoggable(Level.FINER)) s_log.finer(product.getName() + " = " + retValue);
return retValue;
}
return null;
@ -565,7 +565,7 @@ public class MCost extends X_M_Cost
if (retValue != null)
{
s_log.finer(product.getName() + " = " + retValue);
if (s_log.isLoggable(Level.FINER)) s_log.finer(product.getName() + " = " + retValue);
return retValue;
}
return null;
@ -617,7 +617,7 @@ public class MCost extends X_M_Cost
if (retValue != null)
{
s_log.finer(product.getName() + " = " + retValue);
if (s_log.isLoggable(Level.FINER)) s_log.finer(product.getName() + " = " + retValue);
return retValue;
}
return null;
@ -659,7 +659,7 @@ public class MCost extends X_M_Cost
{
BigDecimal cost = getCurrentCost(product, 0, ass[i], 0,
null, Env.ONE, 0, false, trxNameUsed); // create non-zero costs
s_log.info(product.getName() + " = " + cost);
if (s_log.isLoggable(Level.INFO)) s_log.info(product.getName() + " = " + cost);
}
}
}
@ -864,7 +864,7 @@ public class MCost extends X_M_Cost
BigDecimal matchQty = rs.getBigDecimal(2);
if (matchQty == null)
{
s_log.finer("Movement=" + movementQty + ", StockQty=" + newStockQty);
if (s_log.isLoggable(Level.FINER)) s_log.finer("Movement=" + movementQty + ", StockQty=" + newStockQty);
continue;
}
// Assumption: everything is matched
@ -884,7 +884,7 @@ public class MCost extends X_M_Cost
BigDecimal newAmt = averageCurrent.add(averageIncrease);
newAmt = newAmt.setScale(as.getCostingPrecision(), BigDecimal.ROUND_HALF_UP);
newAverageAmt = newAmt.divide(newStockQty, as.getCostingPrecision(), BigDecimal.ROUND_HALF_UP);
s_log.finer("Movement=" + movementQty + ", StockQty=" + newStockQty
if (s_log.isLoggable(Level.FINER)) s_log.finer("Movement=" + movementQty + ", StockQty=" + newStockQty
+ ", Match=" + matchQty + ", Cost=" + cost + ", NewAvg=" + newAverageAmt);
}
}
@ -900,7 +900,7 @@ public class MCost extends X_M_Cost
//
if (newAverageAmt != null && newAverageAmt.signum() != 0)
{
s_log.finer(product.getName() + " = " + newAverageAmt);
if (s_log.isLoggable(Level.FINER)) s_log.finer(product.getName() + " = " + newAverageAmt);
return newAverageAmt;
}
return null;
@ -958,7 +958,7 @@ public class MCost extends X_M_Cost
BigDecimal matchQty = rs.getBigDecimal(2);
if (matchQty == null)
{
s_log.finer("Movement=" + movementQty + ", StockQty=" + newStockQty);
if (s_log.isLoggable(Level.FINER)) s_log.finer("Movement=" + movementQty + ", StockQty=" + newStockQty);
continue;
}
// Assumption: everything is matched
@ -980,7 +980,7 @@ public class MCost extends X_M_Cost
BigDecimal newAmt = averageCurrent.add(averageIncrease);
newAmt = newAmt.setScale(as.getCostingPrecision(), BigDecimal.ROUND_HALF_UP);
newAverageAmt = newAmt.divide(newStockQty, as.getCostingPrecision(), BigDecimal.ROUND_HALF_UP);
s_log.finer("Movement=" + movementQty + ", StockQty=" + newStockQty
if (s_log.isLoggable(Level.FINER)) s_log.finer("Movement=" + movementQty + ", StockQty=" + newStockQty
+ ", Match=" + matchQty + ", Cost=" + cost + ", NewAvg=" + newAverageAmt);
}
}
@ -996,7 +996,7 @@ public class MCost extends X_M_Cost
//
if (newAverageAmt != null && newAverageAmt.signum() != 0)
{
s_log.finer(product.getName() + " = " + newAverageAmt);
if (s_log.isLoggable(Level.FINER)) s_log.finer(product.getName() + " = " + newAverageAmt);
return newAverageAmt;
}
return null;
@ -1082,7 +1082,7 @@ public class MCost extends X_M_Cost
QtyCost pp = new QtyCost (movementQty, Env.ZERO);
fifo.add(pp);
}
s_log.finer("Movement=" + movementQty + ", Size=" + fifo.size());
if (s_log.isLoggable(Level.FINER)) s_log.finer("Movement=" + movementQty + ", Size=" + fifo.size());
continue;
}
// Assumption: everything is matched
@ -1117,7 +1117,7 @@ public class MCost extends X_M_Cost
QtyCost pp = new QtyCost (movementQty, cost);
fifo.add(pp);
}
s_log.finer("Movement=" + movementQty + ", Size=" + fifo.size());
if (s_log.isLoggable(Level.FINER)) s_log.finer("Movement=" + movementQty + ", Size=" + fifo.size());
}
}
catch (SQLException e)
@ -1135,7 +1135,7 @@ public class MCost extends X_M_Cost
return null;
}
QtyCost pp = (QtyCost)fifo.get(0);
s_log.finer(product.getName() + " = " + pp.Cost);
if (s_log.isLoggable(Level.FINER)) s_log.finer(product.getName() + " = " + pp.Cost);
return pp.Cost;
} // calculateFiFo
@ -1220,7 +1220,7 @@ public class MCost extends X_M_Cost
QtyCost pp = new QtyCost (movementQty, Env.ZERO);
lifo.add(pp);
}
s_log.finer("Movement=" + movementQty + ", Size=" + lifo.size());
if (s_log.isLoggable(Level.FINER)) s_log.finer("Movement=" + movementQty + ", Size=" + lifo.size());
continue;
}
// Assumption: everything is matched
@ -1236,7 +1236,7 @@ public class MCost extends X_M_Cost
//
QtyCost pp = new QtyCost (movementQty, cost);
lifo.add(pp);
s_log.finer("Movement=" + movementQty + ", Size=" + lifo.size());
if (s_log.isLoggable(Level.FINER)) s_log.finer("Movement=" + movementQty + ", Size=" + lifo.size());
}
}
catch (SQLException e)
@ -1254,7 +1254,7 @@ public class MCost extends X_M_Cost
return null;
}
QtyCost pp = (QtyCost)lifo.get(lifo.size()-1);
s_log.finer(product.getName() + " = " + pp.Cost);
if (s_log.isLoggable(Level.FINER)) s_log.finer(product.getName() + " = " + pp.Cost);
return pp.Cost;
} // calculateLiFo
@ -1672,7 +1672,7 @@ public class MCost extends X_M_Cost
{
if (CurrentQty.signum() < 0)
{
throw new AverageCostingNegativeQtyException("Product(ID)="+getM_Product_ID()+", Current Qty="+getCurrentQty()+", New Current Qty="+CurrentQty
throw new AverageCostingNegativeQtyException("Product="+getM_Product().getName()+", Current Qty="+getCurrentQty()+", New Current Qty="+CurrentQty
+", CostElement="+ce.getName()+", Schema="+getC_AcctSchema().getName());
}
}

View File

@ -19,6 +19,7 @@ package org.compiere.model;
import java.sql.ResultSet;
import java.util.List;
import java.util.Properties;
import java.util.logging.Level;
import org.compiere.util.CCache;
import org.compiere.util.CLogger;
@ -100,7 +101,7 @@ public class MCostElement extends X_M_CostElement
if (list.size() > 0)
retValue = list.get(0);
if (list.size() > 1)
s_log.info("More then one Material Cost Element for CostingMethod=" + CostingMethod);
if (s_log.isLoggable(Level.INFO)) s_log.info("More then one Material Cost Element for CostingMethod=" + CostingMethod);
return retValue;
} // getMaterialCostElement

View File

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

View File

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

View File

@ -3,6 +3,7 @@ import java.math.BigDecimal;
import java.math.RoundingMode;
import java.sql.ResultSet;
import java.util.Properties;
import java.util.logging.Level;
import java.util.logging.Logger;
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);
// logging
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 ... */
@ -382,7 +383,7 @@ public class MDepreciation extends X_A_Depreciation
else {
amtPerYear = amt_sl;
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 {
@ -391,9 +392,9 @@ public class MDepreciation extends X_A_Depreciation
}
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 */
BigDecimal assetExp = getPeriodExp(A_Current_Period, amtPerYear);

View File

@ -2,7 +2,6 @@ package org.compiere.model;
import java.math.BigDecimal;
import java.sql.CallableStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Properties;
import java.util.logging.Level;

View File

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

View File

@ -21,6 +21,8 @@ import java.util.ArrayList;
import java.util.List;
import java.util.Properties;
import java.util.StringTokenizer;
import java.util.logging.Level;
import static org.compiere.model.SystemIDs.*;
import org.compiere.util.CLogger;
@ -44,7 +46,7 @@ public class MEntityType extends X_AD_EntityType
/**
*
*/
private static final long serialVersionUID = 8906219523978497906L;
private static final long serialVersionUID = 4670009709141738924L;
/**
* Get Entity Types
@ -61,7 +63,7 @@ public class MEntityType extends X_AD_EntityType
.list();
s_entityTypes = new MEntityType[list.size()];
list.toArray(s_entityTypes);
s_log.finer("# " + s_entityTypes.length);
if (s_log.isLoggable(Level.FINER)) s_log.finer("# " + s_entityTypes.length);
return s_entityTypes;
} // getEntityTypes
@ -99,7 +101,7 @@ public class MEntityType extends X_AD_EntityType
list.add(s);
retValue[i] = s;
}
s_log.finer(list.toString());
if (s_log.isLoggable(Level.FINER)) s_log.finer(list.toString());
return retValue;
} // getEntityTypeStrings
@ -130,7 +132,7 @@ public class MEntityType extends X_AD_EntityType
}
String[] retValue = new String[list.size()];
list.toArray(retValue);
s_log.finer(list.toString());
if (s_log.isLoggable(Level.FINER)) s_log.finer(list.toString());
return retValue;
} // getClathpaths
@ -162,7 +164,7 @@ public class MEntityType extends X_AD_EntityType
}
String[] retValue = new String[list.size()];
list.toArray(retValue);
s_log.finer(list.toString());
if (s_log.isLoggable(Level.FINER)) s_log.finer(list.toString());
return retValue;
} // getModelPackages

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=?";
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;
}

View File

@ -70,7 +70,7 @@ public class MInOutConfirm extends X_M_InOutConfirm implements DocAction
MInOutConfirm confirm = confirmations[i];
if (confirm.getConfirmType().equals(confirmType))
{
s_log.info("create - existing: " + confirm);
if (s_log.isLoggable(Level.INFO)) s_log.info("create - existing: " + confirm);
return confirm;
}
}
@ -86,7 +86,7 @@ public class MInOutConfirm extends X_M_InOutConfirm implements DocAction
cLine.setInOutLine(sLine);
cLine.saveEx();
}
s_log.info("New: " + confirm);
if (s_log.isLoggable(Level.INFO)) s_log.info("New: " + confirm);
return confirm;
} // MInOutConfirm

View File

@ -21,6 +21,7 @@ import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Properties;
import java.util.logging.Level;
import org.adempiere.exceptions.DBException;
import org.compiere.util.CLogger;
@ -80,7 +81,7 @@ public class MInvoiceTax extends X_C_InvoiceTax
{
retValue.set_TrxName(trxName);
retValue.setPrecision(precision);
s_log.fine("(old=" + oldTax + ") " + retValue);
if (s_log.isLoggable(Level.FINE)) s_log.fine("(old=" + oldTax + ") " + retValue);
return retValue;
}
// 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.setPrecision(precision);
retValue.setIsTaxIncluded(line.isTaxIncluded());
s_log.fine("(new) " + retValue);
if (s_log.isLoggable(Level.FINE)) s_log.fine("(new) " + retValue);
return retValue;
} // get

View File

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

View File

@ -217,8 +217,7 @@ public class MLookupFactory
return null;
}
info.Query = newSQL;
if (s_log.isLoggable(Level.FINE))
s_log.fine("getLookupInfo, newSQL ="+newSQL); //jz
if (s_log.isLoggable(Level.FINE)) s_log.fine("getLookupInfo, newSQL ="+newSQL); //jz
}
// Direct Query - NO Validation/Security
@ -231,8 +230,7 @@ public class MLookupFactory
return null;
}
info.QueryDirect = newSQL;
if (s_log.isLoggable(Level.FINE))
s_log.fine("getLookupInfo, newSQL ="+newSQL); //jz
if (s_log.isLoggable(Level.FINE)) s_log.fine("getLookupInfo, newSQL ="+newSQL); //jz
}
// Validation
@ -367,8 +365,7 @@ public class MLookupFactory
MLookupInfo retValue = (MLookupInfo)s_cacheRefTable.get(key.toString());
if (retValue != null)
{
if (s_log.isLoggable(Level.FINEST))
s_log.finest("Cache: " + retValue);
if (s_log.isLoggable(Level.FINEST)) s_log.finest("Cache: " + retValue);
return retValue.cloneIt();
}
//
@ -556,8 +553,7 @@ public class MLookupFactory
else
realSQL.append(" ORDER BY 3");
if (s_log.isLoggable(Level.FINEST))
s_log.finest("AD_Reference_Value_ID=" + AD_Reference_Value_ID + " - " + realSQL);
if (s_log.isLoggable(Level.FINEST)) s_log.finest("AD_Reference_Value_ID=" + AD_Reference_Value_ID + " - " + realSQL);
if (overrideZoomWindow > 0)
{
ZoomWindow = overrideZoomWindow;
@ -762,8 +758,7 @@ public class MLookupFactory
realSQL.append(" ORDER BY 3");
MQuery zoomQuery = null; // corrected in VLookup
if (s_log.isLoggable(Level.FINE))
s_log.fine("ColumnName=" + ColumnName + " - " + realSQL);
if (s_log.isLoggable(Level.FINE)) s_log.fine("ColumnName=" + ColumnName + " - " + realSQL);
StringBuilder msginf = new StringBuilder().append(TableName).append(".").append(KeyColumn);
MLookupInfo lInfo = new MLookupInfo(realSQL.toString(), TableName,
msginf.toString(), ZoomWindow, ZoomWindowPO, zoomQuery);

View File

@ -1111,7 +1111,7 @@ public class MMatchPO extends X_M_MatchPO
if (errors == 0 && success == 0)
;
else
s_log.info("Success #" + success + " - Error #" + errors);
if (s_log.isLoggable(Level.INFO)) s_log.info("Success #" + success + " - Error #" + errors);
} // consolidate
//AZ Goodwill

View File

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

View File

@ -101,7 +101,7 @@ public class MOrderTax extends X_C_OrderTax
{
retValue.setPrecision(precision);
retValue.set_TrxName(trxName);
s_log.fine("(old=" + oldTax + ") " + retValue);
if (s_log.isLoggable(Level.FINE)) s_log.fine("(old=" + oldTax + ") " + retValue);
return retValue;
}
// 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.setPrecision(precision);
retValue.setIsTaxIncluded(line.isTaxIncluded());
s_log.fine("(new) " + retValue);
if (s_log.isLoggable(Level.FINE)) s_log.fine("(new) " + retValue);
return retValue;
} // get

View File

@ -202,7 +202,7 @@ public final class MPaySelectionCheck extends X_C_PaySelectionCheck
static public MPaySelectionCheck[] get (int C_PaySelection_ID,
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);
ArrayList<MPaySelectionCheck> list = new ArrayList<MPaySelectionCheck>();
@ -300,11 +300,11 @@ public final class MPaySelectionCheck extends X_C_PaySelectionCheck
}
// Link to Invoice
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)
{
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.setDiscountAmt (psl.getDiscountAmt());
@ -352,7 +352,7 @@ public final class MPaySelectionCheck extends X_C_PaySelectionCheck
s_log.log(Level.SEVERE, "Check not saved: " + check);
} // all checks
s_log.fine("Last Document No = " + lastDocumentNo);
if (s_log.isLoggable(Level.FINE)) s_log.fine("Last Document No = " + lastDocumentNo);
return lastDocumentNo;
} // confirmPrint

View File

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

View File

@ -179,7 +179,7 @@ public class MPeriod extends X_C_Period
rs = null; pstmt = null;
}
if (retValue == null)
s_log.info("No Standard Period for " + DateAcct
if (s_log.isLoggable(Level.INFO)) s_log.info("No Standard Period for " + DateAcct
+ " (AD_Client_ID=" + AD_Client_ID + ")");
return retValue;
}

View File

@ -101,7 +101,7 @@ public class MProductCategory extends X_M_Product_Category
// TODO: LRU logic
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
+ " - " + (category.intValue() == M_Product_Category_ID));
return category.intValue() == M_Product_Category_ID;

View File

@ -98,7 +98,7 @@ public class MProductDownload extends X_M_ProductDownload
rs = null;
pstmt = null;
}
s_log.info("#" + count);
if (s_log.isLoggable(Level.INFO)) s_log.info("#" + count);
} // migrateDownloads
/** Logger */

View File

@ -54,7 +54,7 @@ public class MQuery implements Serializable
*/
static public MQuery get (Properties ctx, int AD_PInstance_ID, String TableName)
{
s_log.info("AD_PInstance_ID=" + AD_PInstance_ID + ", TableName=" + TableName);
if (s_log.isLoggable(Level.INFO)) s_log.info("AD_PInstance_ID=" + AD_PInstance_ID + ", TableName=" + TableName);
MQuery query = new MQuery(TableName);
// Temporary Tables - add qualifier (not displayed)
boolean isTemporaryTable = false;
@ -139,7 +139,7 @@ public class MQuery implements Serializable
String Name = rs.getString(10);
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
+ "; Name=" + Name + ", Info=" + Info + "-" + Info_To + ", Range=" + isRange);
//
@ -147,7 +147,7 @@ public class MQuery implements Serializable
// This condition applies only to temporary tables - teo_sarca [ 2860022 ]
if (isTemporaryTable && !isFinancialReport && table != null && table.getColumn(ParameterName) == null)
{
s_log.info("Skip parameter "+ParameterName+" because there is no column in table "+TableName);
if (s_log.isLoggable(Level.INFO)) s_log.info("Skip parameter "+ParameterName+" because there is no column in table "+TableName);
continue;
}
@ -222,7 +222,7 @@ public class MQuery implements Serializable
DB.close(rs, pstmt);
rs = null; pstmt = null;
}
s_log.info(query.toString());
if (s_log.isLoggable(Level.INFO)) s_log.info(query.toString());
return query;
} // get

View File

@ -96,7 +96,7 @@ public class MRMATax extends X_M_RMATax
{
retValue.setPrecision(precision);
retValue.set_TrxName(trxName);
s_log.fine("(old=" + oldTax + ") " + retValue);
if (s_log.isLoggable(Level.FINE)) s_log.fine("(old=" + oldTax + ") " + retValue);
return retValue;
}
// 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.setPrecision(precision);
retValue.setIsTaxIncluded(line.getParent().isTaxIncluded());
s_log.fine("(new) " + retValue);
if (s_log.isLoggable(Level.FINE)) s_log.fine("(new) " + retValue);
return retValue;
}

View File

@ -170,7 +170,7 @@ public class MRefList extends X_AD_Ref_List
if (retValue == null)
{
retValue = "";
s_log.info("getListDescription - Not found " + key);
if (s_log.isLoggable(Level.INFO)) s_log.info("getListDescription - Not found " + key);
}
s_cache.put(key, retValue);
//

View File

@ -81,7 +81,7 @@ public final class MRegion extends X_C_Region
rs = 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
/**

View File

@ -119,7 +119,7 @@ public final class MRole extends X_AD_Role
*/
public static MRole get (Properties ctx, int AD_Role_ID, int AD_User_ID, boolean reload)
{
s_log.info("AD_Role_ID=" + AD_Role_ID + ", AD_User_ID=" + AD_User_ID + ", reload=" + reload);
if (s_log.isLoggable(Level.INFO)) s_log.info("AD_Role_ID=" + AD_Role_ID + ", AD_User_ID=" + AD_User_ID + ", reload=" + reload);
String key = AD_Role_ID + "_" + AD_User_ID;
MRole role = (MRole)s_roles.get (key);
if (role == null || reload)
@ -133,7 +133,7 @@ public final class MRole extends X_AD_Role
}
role.setAD_User_ID(AD_User_ID);
role.loadAccess(reload);
s_log.info(role.toString());
if (s_log.isLoggable(Level.INFO)) s_log.info(role.toString());
}
return role;
} // get
@ -2538,7 +2538,7 @@ public final class MRole extends X_AD_Role
pstmt1.setInt(1, getAD_Role_ID());
pstmt1.setString(2, doc.getDocBaseType());
s_log.info(sql1 + " : " + getAD_Role_ID() + " "
if (s_log.isLoggable(Level.INFO)) s_log.info(sql1 + " : " + getAD_Role_ID() + " "
+ doc.getDocBaseType());
rs1 = pstmt1.executeQuery();
@ -2563,7 +2563,7 @@ public final class MRole extends X_AD_Role
pstmt = DB.prepareStatement(sql, null);
DB.setParameters(pstmt, params);
s_log.info(sql + " : " );
if (s_log.isLoggable(Level.INFO)) s_log.info(sql + " : " );
rs = pstmt.executeQuery();
while (rs.next()) {
String op = rs.getString(1);
@ -2619,7 +2619,7 @@ public final class MRole extends X_AD_Role
}
}
s_log.info("Include "+role);
if (s_log.isLoggable(Level.INFO)) s_log.info("Include "+role);
if(role.isActive()){
this.m_includedRoles.add(role);

View File

@ -126,7 +126,7 @@ public class MRoleOrgAccess extends X_AD_Role_OrgAccess
counter++;
}
}
s_log.info(org + " - created #" + counter);
if (s_log.isLoggable(Level.INFO)) s_log.info(org + " - created #" + counter);
return counter != 0;
} // createForOrg

View File

@ -449,7 +449,7 @@ public class MSequence extends X_AD_Sequence
// + " - Type=" + pstmt.getResultSetType() + " - Concur=" + pstmt.getResultSetConcurrency());
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;
try
@ -548,7 +548,7 @@ public class MSequence extends X_AD_Sequence
if (suffix != null && suffix.length() > 0)
doc.append(Env.parseVariable(suffix, po, trxName, false));
String documentNo = doc.toString();
s_log.finer (documentNo + " (" + incrementNo + ")"
if (s_log.isLoggable(Level.FINER)) s_log.finer (documentNo + " (" + incrementNo + ")"
+ " - Sequence=" + AD_Sequence_ID + " [" + trx + "]");
return documentNo;
}
@ -596,7 +596,7 @@ public class MSequence extends X_AD_Sequence
MDocType dt = MDocType.get (Env.getCtx(), C_DocType_ID); // wrong for SERVER, but r/o
if (dt != null && !dt.isDocNoControlled())
{
s_log.finer("DocType_ID=" + C_DocType_ID + " Not DocNo controlled");
if (s_log.isLoggable(Level.FINER)) s_log.finer("DocType_ID=" + C_DocType_ID + " Not DocNo controlled");
return null;
}
if (definite && ! dt.isOverwriteSeqOnComplete()) {
@ -656,7 +656,7 @@ public class MSequence extends X_AD_Sequence
while (rs.next())
{
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);
if (seq.save())
counter++;
@ -678,7 +678,7 @@ public class MSequence extends X_AD_Sequence
rs = null;
pstmt = null;
}
s_log.info ("AD_Client_ID=" + AD_Client_ID
if (s_log.isLoggable(Level.INFO)) s_log.info ("AD_Client_ID=" + AD_Client_ID
+ " - created #" + counter
+ " - success=" + success);
return success;

View File

@ -94,7 +94,7 @@ public class MStatusCategory extends X_R_StatusCategory
String sql = "UPDATE R_Status SET R_StatusCategory_ID=" + retValue.getR_StatusCategory_ID()
+ " WHERE R_StatusCategory_ID IS NULL AND AD_Client_ID=" + AD_Client_ID;
int no = DB.executeUpdate(sql, null);
s_log.info("Default for AD_Client_ID=" + AD_Client_ID + " - Status #" + no);
if (s_log.isLoggable(Level.INFO)) s_log.info("Default for AD_Client_ID=" + AD_Client_ID + " - Status #" + no);
return retValue;
} // createDefault

View File

@ -67,10 +67,10 @@ public class MStorageOnHand extends X_M_StorageOnHand
.first();
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);
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);
return retValue;
} // get
@ -339,7 +339,7 @@ public class MStorageOnHand extends X_M_StorageOnHand
//
retValue = new MStorageOnHand (locator, M_Product_ID, M_AttributeSetInstance_ID);
retValue.saveEx(trxName);
s_log.fine("New " + retValue);
if (s_log.isLoggable(Level.FINE)) s_log.fine("New " + retValue);
return retValue;
} // getCreate
@ -380,7 +380,7 @@ public class MStorageOnHand extends X_M_StorageOnHand
storage.setQtyOnHand (storage.getQtyOnHand().add (diffQtyOnHand));
if (s_log.isLoggable(Level.FINE)) {
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);
} // add

View File

@ -75,10 +75,10 @@ public class MStorageReservation extends X_M_StorageReservation {
rs = null; pstmt = 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);
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);
return retValue;
} // get
@ -257,7 +257,7 @@ public class MStorageReservation extends X_M_StorageReservation {
storage.setQty (storage.getQty().add(diffQty));
if (s_log.isLoggable(Level.FINE)) {
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);
} // add
@ -289,7 +289,7 @@ public class MStorageReservation extends X_M_StorageReservation {
//
retValue = new MStorageReservation (warehouse, M_Product_ID, M_AttributeSetInstance_ID, isSOTrx);
retValue.saveEx(trxName);
s_log.fine("New " + retValue);
if (s_log.isLoggable(Level.FINE)) s_log.fine("New " + retValue);
return retValue;
} // getCreate

View File

@ -185,7 +185,7 @@ public class MStore extends X_W_Store
Collection<?> cc = s_cache.values();
Object[] oo = cc.toArray();
for (int i = 0; i < oo.length; i++)
s_log.info(i + ": " + oo[i]);
if (s_log.isLoggable(Level.INFO)) s_log.info(i + ": " + oo[i]);
MStore[] retValue = new MStore[oo.length];
for (int i = 0; i < oo.length; i++)
retValue[i] = (MStore)oo[i];

View File

@ -92,8 +92,7 @@ public class MToolBarButtonRestrict extends X_AD_ToolBarButtonRestrict
**/
public static int[] getOfWindow(Properties ctx, int AD_Role_ID, int AD_Window_ID, boolean reportViewer, String trxName)
{
if (s_log.isLoggable(Level.INFO))
s_log.info("sql="+GET_OF_WINDOW_SQL);
if (s_log.isLoggable(Level.INFO)) s_log.info("sql="+GET_OF_WINDOW_SQL);
int[] ids = DB.getIDsEx(trxName, GET_OF_WINDOW_SQL, Env.getAD_Client_ID(ctx), AD_Role_ID, AD_Window_ID, reportViewer ? "R" : "W");
@ -109,8 +108,7 @@ public class MToolBarButtonRestrict extends X_AD_ToolBarButtonRestrict
**/
public static int[] getOfReport(Properties ctx, int AD_Role_ID, int AD_Process_ID, String trxName)
{
if (s_log.isLoggable(Level.INFO))
s_log.info("sql="+GET_OF_REPORT_SQL);
if (s_log.isLoggable(Level.INFO)) s_log.info("sql="+GET_OF_REPORT_SQL);
int[] ids = DB.getIDsEx(trxName, GET_OF_REPORT_SQL, Env.getAD_Client_ID(ctx), AD_Role_ID, AD_Process_ID, "R");
@ -120,8 +118,7 @@ public class MToolBarButtonRestrict extends X_AD_ToolBarButtonRestrict
/** Returns a list of restrictions to be applied according to the role for ad_tab toolbar buttons **/
public static int[] getOfTab(Properties ctx, int AD_Role_ID, int AD_Tab_ID, String trxName)
{
if (s_log.isLoggable(Level.INFO))
s_log.info("sql="+GET_OF_TAB_SQL);
if (s_log.isLoggable(Level.INFO)) s_log.info("sql="+GET_OF_TAB_SQL);
int[] ids = DB.getIDsEx(trxName, GET_OF_TAB_SQL, Env.getAD_Client_ID(ctx), AD_Role_ID, AD_Tab_ID);

View File

@ -434,7 +434,7 @@ public class MUOMConversion extends X_C_UOM_Conversion
}
if (retValue == null)
{
s_log.info ("NOT found - FromUOM=" + C_UOM_From_ID + ", ToUOM=" + C_UOM_To_ID);
if (s_log.isLoggable(Level.INFO)) s_log.info ("NOT found - FromUOM=" + C_UOM_From_ID + ", ToUOM=" + C_UOM_To_ID);
return null;
}
@ -533,7 +533,7 @@ public class MUOMConversion extends X_C_UOM_Conversion
if (qtyPrice == null || qtyPrice.compareTo(Env.ZERO)==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;
}
@ -547,7 +547,7 @@ public class MUOMConversion extends X_C_UOM_Conversion
return uom.round(retValue.multiply(qtyPrice), true);
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;
} // convertProductFrom
@ -613,7 +613,7 @@ public class MUOMConversion extends X_C_UOM_Conversion
result = new MUOMConversion[list.size ()];
list.toArray (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;
} // getProductConversions

View File

@ -90,7 +90,7 @@ public class MWarehousePrice extends X_RV_WarehousePrice
//
String finalSQL = MRole.getDefault().addAccessSQL(sql.toString(),
"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
+ " - " + finalSQL);
ArrayList<MWarehousePrice> list = new ArrayList<MWarehousePrice>();
@ -125,7 +125,7 @@ public class MWarehousePrice extends X_RV_WarehousePrice
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()];
list.toArray(retValue);
return retValue;

View File

@ -1238,7 +1238,7 @@ public abstract class PO
*/
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
if (from.getClass() != to.getClass())
{

View File

@ -28,10 +28,10 @@ import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Properties;
import java.util.logging.Level;
import org.adempiere.exceptions.AdempiereException;
import org.adempiere.exceptions.DBException;
import org.compiere.util.CLogMgt;
import org.compiere.util.CLogger;
import org.compiere.util.DB;
import org.compiere.util.Env;
@ -120,7 +120,7 @@ public class SetGetUtil
{
for (SetGetModel model : models)
{
if(CLogMgt.isLevelFinest()) s_log.finest("Model: " + model);
if (s_log.isLoggable(Level.FINEST)) s_log.finest("Model: " + model);
if (rs.next())
{
if (columnNames == null)
@ -149,12 +149,12 @@ public class SetGetUtil
}
//
ok = model.set_AttrValue(columnName, obj);
if (CLogMgt.isLevelFinest()) s_log.finest("columnName=" + columnName + ", value=[" + obj + "][" + (obj != null ? obj.getClass().getName() : "null") + "], ok=" + ok);
if (s_log.isLoggable(Level.FINEST)) s_log.finest("columnName=" + columnName + ", value=[" + obj + "][" + (obj != null ? obj.getClass().getName() : "null") + "], ok=" + ok);
}
}
else
{
s_log.finest("@NoResult@");
if (s_log.isLoggable(Level.FINEST)) s_log.finest("@NoResult@");
break;
}
}
@ -234,7 +234,7 @@ public class SetGetUtil
String[] includeFields, String[] excludeFields,
boolean trackOnlyChanges)
{
if (CLogMgt.isLevelFinest())
if (s_log.isLoggable(Level.FINEST))
{
s_log.finest("Entering: From=" + from+ " - To=" + to);
// s_log.finest("includeFields=" + ARHIPAC.toString(includeFields));
@ -243,7 +243,7 @@ public class SetGetUtil
//
if (to == null || from == null)
{
if (CLogMgt.isLevelFinest())
if (s_log.isLoggable(Level.FINEST))
{
s_log.finest("Leaving: to == null || from == null");
Thread.dumpStack();
@ -308,19 +308,19 @@ public class SetGetUtil
//-
if (isExcluded)
{
if (CLogMgt.isLevelFinest()) s_log.finest("Field " + colName + " [SKIP:excluded]");
if (s_log.isLoggable(Level.FINEST)) s_log.finest("Field " + colName + " [SKIP:excluded]");
continue;
}
int idx_to = to.get_ColumnIndex(colName);
if (idx_to < 0)
{
if (CLogMgt.isLevelFinest()) s_log.finest("Field " + colName + " [SKIP:idx_to < 0]");
if (s_log.isLoggable(Level.FINEST)) s_log.finest("Field " + colName + " [SKIP:idx_to < 0]");
continue;
}
if (to.p_info.isVirtualColumn(idx_to) || to.p_info.isKey(idx_to))
{ // KeyColumn
if (CLogMgt.isLevelFinest()) s_log.finest("Field " + colName + " [SKIP:virtual or key]");
if (s_log.isLoggable(Level.FINEST)) s_log.finest("Field " + colName + " [SKIP:virtual or key]");
continue;
}
@ -331,10 +331,10 @@ public class SetGetUtil
{
copiedFields++;
}
if (CLogMgt.isLevelFinest()) s_log.finest("Field " + colName + "=[" + value + "], idx=" + idx_from + "->" + idx_to);
if (s_log.isLoggable(Level.FINEST)) s_log.finest("Field " + colName + "=[" + value + "], idx=" + idx_from + "->" + idx_to);
}
//
if (CLogMgt.isLevelFinest()) s_log.finest("Leaving: to=" + to);
if (s_log.isLoggable(Level.FINEST)) s_log.finest("Leaving: to=" + to);
return copiedFields;
} // copyValues

View File

@ -656,7 +656,7 @@ public class MPrintFormat extends X_AD_PrintFormat
int AD_Table_ID, int AD_PrintFormat_ID)
{
int AD_Client_ID = Env.getAD_Client_ID(ctx);
s_log.info ("AD_Table_ID=" + AD_Table_ID + " - AD_Client_ID=" + AD_Client_ID);
if (s_log.isLoggable(Level.INFO)) s_log.info ("AD_Table_ID=" + AD_Table_ID + " - AD_Client_ID=" + AD_Client_ID);
MPrintFormat pf = new MPrintFormat(ctx, AD_PrintFormat_ID, null);
pf.setAD_Table_ID (AD_Table_ID);
@ -739,7 +739,7 @@ public class MPrintFormat extends X_AD_PrintFormat
static public MPrintFormat createFromReportView (Properties ctx, int AD_ReportView_ID, String ReportName)
{
int AD_Client_ID = Env.getAD_Client_ID(ctx);
s_log.info ("AD_ReportView_ID=" + AD_ReportView_ID + " - AD_Client_ID=" + AD_Client_ID + " - " + ReportName);
if (s_log.isLoggable(Level.INFO)) s_log.info ("AD_ReportView_ID=" + AD_ReportView_ID + " - AD_Client_ID=" + AD_Client_ID + " - " + ReportName);
MPrintFormat pf = new MPrintFormat(ctx, 0, null);
pf.setAD_ReportView_ID (AD_ReportView_ID);
@ -895,7 +895,7 @@ public class MPrintFormat extends X_AD_PrintFormat
//
MPrintFormatItem[] retValue = new MPrintFormatItem[list.size()];
list.toArray(retValue);
s_log.info(format + " - #" + retValue.length);
if (s_log.isLoggable(Level.INFO)) s_log.info(format + " - #" + retValue.length);
return retValue;
} // createItems
@ -907,7 +907,7 @@ public class MPrintFormat extends X_AD_PrintFormat
*/
static private MPrintFormatItem[] copyItems (MPrintFormat fromFormat, MPrintFormat toFormat)
{
s_log.info("From=" + fromFormat);
if (s_log.isLoggable(Level.INFO)) s_log.info("From=" + fromFormat);
ArrayList<MPrintFormatItem> list = new ArrayList<MPrintFormatItem>();
MPrintFormatItem[] items = fromFormat.getItemsNotIn(toFormat.get_ID());
@ -1003,7 +1003,7 @@ public class MPrintFormat extends X_AD_PrintFormat
private static MPrintFormat copy (Properties ctx, int from_AD_PrintFormat_ID,
int to_AD_PrintFormat_ID, int to_Client_ID)
{
s_log.info ("From AD_PrintFormat_ID=" + from_AD_PrintFormat_ID
if (s_log.isLoggable(Level.INFO)) s_log.info ("From AD_PrintFormat_ID=" + from_AD_PrintFormat_ID
+ ", To AD_PrintFormat_ID=" + to_AD_PrintFormat_ID
+ ", To Client_ID=" + to_Client_ID);
if (from_AD_PrintFormat_ID == 0)

View File

@ -158,7 +158,7 @@ public final class Msg
s_log.log(Level.SEVERE, "Too few (" + msg.size() + ") Records found for " + AD_Language);
return null;
}
s_log.info("Records=" + msg.size() + " - " + AD_Language);
if (s_log.isLoggable(Level.INFO)) s_log.info("Records=" + msg.size() + " - " + AD_Language);
return msg;
} // initMsg
@ -259,8 +259,7 @@ public final class Msg
//
if (retStr == null || retStr.length() == 0)
{
if (s_log.isLoggable(Level.INFO))
s_log.info("NOT found: " + AD_Message);
if (s_log.isLoggable(Level.INFO)) s_log.info("NOT found: " + AD_Message);
return AD_Message;
}

View File

@ -4,6 +4,7 @@
package org.idempiere.fa.process;
import java.lang.reflect.Field;
import java.util.logging.Level;
import org.adempiere.exceptions.AdempiereException;
import org.compiere.process.ProcessInfoParameter;
@ -85,7 +86,7 @@ public abstract class SvrProcess2 extends SvrProcess
//
if (!isSet)
{
s_log.info("Parameter not set - "+parameterName);
if (s_log.isLoggable(Level.INFO)) s_log.info("Parameter not set - "+parameterName);
}
} // for Field
}

View File

@ -35,7 +35,7 @@ public class PipoDictionaryService implements IDictionaryService {
X_AD_Package_Imp_Proc adPackageImp = new X_AD_Package_Imp_Proc(Env.getCtx(),
0, trxName);
File zipFilepath = packageFile;
logger.info("zipFilepath->" + zipFilepath);
if (logger.isLoggable(Level.INFO)) logger.info("zipFilepath->" + zipFilepath);
String parentDir = Zipper.getParentDir(zipFilepath);
File targetDir = new File(System.getProperty("java.io.tmpdir"));
Zipper.unpackFile(zipFilepath, targetDir);
@ -43,7 +43,7 @@ public class PipoDictionaryService implements IDictionaryService {
String dict_file = targetDir + File.separator + parentDir + File.separator
+ "dict" + File.separator + "PackOut.xml";
logger.info("dict file->" + dict_file);
if (logger.isLoggable(Level.INFO)) logger.info("dict file->" + dict_file);
// call XML Handler
String msg = packIn.importXML(dict_file, Env.getCtx(), trxName);
@ -54,7 +54,7 @@ public class PipoDictionaryService implements IDictionaryService {
adPackageImp.saveEx();
Trx.get(trxName, false).commit();
logger.info("commit " + trxName);
if (logger.isLoggable(Level.INFO)) logger.info("commit " + trxName);
} catch (Exception e) {
logger.log(Level.SEVERE, "importXML:", e);
throw e;

View File

@ -25,12 +25,10 @@ public class AdempiereActivator implements BundleActivator {
@Override
public void start(BundleContext context) throws Exception {
this.context = context;
if (logger.isLoggable(Level.INFO))
logger.info(getName() + " " + getVersion() + " starting...");
if (logger.isLoggable(Level.INFO)) logger.info(getName() + " " + getVersion() + " starting...");
installPackage();
start();
if (logger.isLoggable(Level.INFO))
logger.info(getName() + " " + getVersion() + " ready.");
if (logger.isLoggable(Level.INFO)) logger.info(getName() + " " + getVersion() + " ready.");
}
public String getName() {
@ -80,11 +78,9 @@ public class AdempiereActivator implements BundleActivator {
if (pkg == null) {
packIn(trxName);
install();
if (logger.isLoggable(Level.INFO))
logger.info(getName() + " " + version + " installed.");
if (logger.isLoggable(Level.INFO)) logger.info(getName() + " " + version + " installed.");
} else {
if (logger.isLoggable(Level.INFO))
logger.info(getName() + " " + version + " was installed: "
if (logger.isLoggable(Level.INFO)) logger.info(getName() + " " + version + " was installed: "
+ pkg.getCreated());
}
Trx.get(trxName, false).commit();
@ -136,7 +132,7 @@ public class AdempiereActivator implements BundleActivator {
@Override
public void stop(BundleContext context) throws Exception {
stop();
logger.info(context.getBundle().getSymbolicName() + " "
if (logger.isLoggable(Level.INFO)) logger.info(context.getBundle().getSymbolicName() + " "
+ context.getBundle().getHeaders().get("Bundle-Version")
+ " stopped.");
}

View File

@ -36,6 +36,7 @@ import java.text.SimpleDateFormat;
import java.util.Collection;
import java.util.List;
import java.util.Properties;
import java.util.logging.Level;
import javax.xml.xpath.XPathExpressionException;
@ -565,10 +566,10 @@ public class ImportHelper {
.setParameters(value)
.firstOnly();
s_log.info("Client_Value =[" + value + "]");
if (s_log.isLoggable(Level.INFO)) s_log.info("Client_Value =[" + value + "]");
if(result != null)
{
s_log.info("AD_Client_ID = " + result.getAD_Client_ID());
if (s_log.isLoggable(Level.INFO)) s_log.info("AD_Client_ID = " + result.getAD_Client_ID());
}
return result;

View File

@ -20,6 +20,7 @@ import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.ArrayList;
import java.util.List;
import java.util.logging.Level;
import javax.swing.JComponent;
import javax.swing.JPopupMenu;
@ -60,7 +61,7 @@ public class AZoomAcross
public AZoomAcross(JComponent invoker, PO po, final int windowID) {
logger.config("PO=" + po+", WindowID="+windowID);
if (logger.isLoggable(Level.CONFIG)) logger.config("PO=" + po+", WindowID="+windowID);
mkZoomTargets(po, windowID);
@ -97,7 +98,7 @@ public class AZoomAcross
windowID)) {
if (zoomInfo.query.getRecordCount() == 0) {
logger.fine("No target records for destination "
if (logger.isLoggable(Level.FINE)) logger.fine("No target records for destination "
+ zoomInfo.destinationDisplay);
continue;
}
@ -115,7 +116,7 @@ public class AZoomAcross
final int AD_Window_ID = zoomInfo.windowId;
final MQuery query = zoomInfo.query;
logger.info("AD_Window_ID=" + AD_Window_ID
if (logger.isLoggable(Level.INFO)) logger.info("AD_Window_ID=" + AD_Window_ID
+ " - " + query);
AWindow frame = new AWindow(null);

View File

@ -649,10 +649,8 @@ DataStatusListener, IADTabpanel, IdSpace
GridField changedField = gridTab.getField(col);
String columnName = changedField.getColumnName();
ArrayList<?> dependants = gridTab.getDependantFields(columnName);
if (logger.isLoggable(Level.CONFIG)) {
logger.config("(" + gridTab.toString() + ") "
if (logger.isLoggable(Level.CONFIG)) logger.config("(" + gridTab.toString() + ") "
+ columnName + " - Dependents=" + dependants.size());
}
if (dependants.size() == 0 && changedField.getCallout().length() > 0)
{
return;
@ -660,9 +658,8 @@ DataStatusListener, IADTabpanel, IdSpace
}
boolean noData = gridTab.getRowCount() == 0;
if (logger.isLoggable(Level.CONFIG)) {
logger.config(gridTab.toString() + " - Rows=" + gridTab.getRowCount());
}
if (logger.isLoggable(Level.CONFIG)) logger.config(gridTab.toString() + " - Rows=" + gridTab.getRowCount());
for (WEditor comp : editors)
{
GridField mField = comp.getGridField();
@ -769,9 +766,7 @@ DataStatusListener, IADTabpanel, IdSpace
}
Events.sendEvent(this, new Event(ON_DYNAMIC_DISPLAY_EVENT, this));
if (logger.isLoggable(Level.CONFIG)) {
logger.config(gridTab.toString() + " - fini - " + (col<=0 ? "complete" : "seletive"));
}
if (logger.isLoggable(Level.CONFIG)) logger.config(gridTab.toString() + " - fini - " + (col<=0 ? "complete" : "seletive"));
} // dynamicDisplay
/**
@ -1095,9 +1090,7 @@ DataStatusListener, IADTabpanel, IdSpace
if (Executions.getCurrent() == null) return;
int col = e.getChangedColumn();
if (logger.isLoggable(Level.CONFIG)) {
logger.config("(" + gridTab + ") Col=" + col + ": " + e.toString());
}
if (logger.isLoggable(Level.CONFIG)) logger.config("(" + gridTab + ") Col=" + col + ": " + e.toString());
// Process Callout
GridField mField = gridTab.getField(col);

View File

@ -877,7 +877,7 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
public void onAttachment()
{
int record_ID = adTabbox.getSelectedGridTab().getRecord_ID();
logger.info("Record_ID=" + record_ID);
if (logger.isLoggable(Level.INFO)) logger.info("Record_ID=" + record_ID);
if (record_ID == -1) // No Key
{
@ -910,7 +910,7 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
public void onChat()
{
int recordId = adTabbox.getSelectedGridTab().getRecord_ID();
logger.info("Record_ID=" + recordId);
if (logger.isLoggable(Level.INFO)) logger.info("Record_ID=" + recordId);
if (recordId== -1) // No Key
{
@ -1244,8 +1244,7 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
if (!detailTab)
{
String dbInfo = e.getMessage();
if (logger.isLoggable(Level.INFO))
logger.info(dbInfo);
if (logger.isLoggable(Level.INFO)) logger.info(dbInfo);
if (adTabbox.getSelectedGridTab() != null && adTabbox.getSelectedGridTab().isQueryActive())
dbInfo = "[ " + dbInfo + " ]";
breadCrumb.setStatusDB(dbInfo, e);
@ -2086,7 +2085,7 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
{
Listitem li = iter.next();
if(li != null)
logger.fine((String) li.getValue());
if (logger.isLoggable(Level.FINE)) logger.fine((String) li.getValue());
}
}
@ -2325,7 +2324,7 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
return;
}
logger.info(wButton.toString());
if (logger.isLoggable(Level.INFO)) logger.info(wButton.toString());
final String col = wButton.getColumnName();
@ -2520,10 +2519,10 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
String error = AEnv.postImmediate (curWindowNo, Env.getAD_Client_ID(ctx),
tableIdRef, recordIdRef, force);
onRefresh(true, false);
if (error != null)
breadCrumb.setStatusLine(error, true);
onRefresh(true, false);
}
}
});
@ -2559,7 +2558,7 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
* Start Process ----
*/
logger.config("Process_ID=" + wButton.getProcess_ID() + ", Record_ID=" + record_ID);
if (logger.isLoggable(Level.CONFIG)) logger.config("Process_ID=" + wButton.getProcess_ID() + ", Record_ID=" + record_ID);
if (wButton.getProcess_ID() == 0)
{

View File

@ -646,7 +646,7 @@ public class WListbox extends Listbox implements IMiniTable, TableValueChangeLis
// repaint the table
this.repaint();
logger.config("Row(rs)=" + getRowCount());
if (logger.isLoggable(Level.CONFIG)) logger.config("Row(rs)=" + getRowCount());
return;
} // loadTable
@ -725,7 +725,7 @@ public class WListbox extends Listbox implements IMiniTable, TableValueChangeLis
// repaint the table
this.repaint();
logger.config("Row(array)=" + getRowCount());
if (logger.isLoggable(Level.CONFIG)) logger.config("Row(array)=" + getRowCount());
return;
} // loadTable

View File

@ -149,8 +149,7 @@ public abstract class ADForm extends Window implements EventListener<Event>
}
else
{
if (logger.isLoggable(Level.INFO))
logger.info("AD_Form_ID=" + adFormID + " - Class=" + formName);
if (logger.isLoggable(Level.INFO)) logger.info("AD_Form_ID=" + adFormID + " - Class=" + formName);
form = Extensions.getForm(formName);
if (form != null)

View File

@ -19,6 +19,7 @@ import java.math.BigInteger;
import java.security.SecureRandom;
import java.util.List;
import java.util.Properties;
import java.util.logging.Level;
import org.adempiere.exceptions.AdempiereException;
import org.adempiere.util.Callback;
@ -445,7 +446,7 @@ public class ResetPasswordPanel extends Window implements EventListener<Event>
user.saveEx();
if (sendEmail(user, newPassword))
logger.fine(user.getEMail());
if (logger.isLoggable(Level.FINE)) logger.fine(user.getEMail());
else
{
if (errorMsg.length() > 0)

View File

@ -19,6 +19,7 @@ package org.adempiere.webui.panel;
import java.util.ArrayList;
import java.util.List;
import java.util.logging.Level;
import org.adempiere.webui.AdempiereWebUI;
import org.adempiere.webui.component.ConfirmPanel;
@ -110,7 +111,7 @@ public class WDocActionPanel extends Window implements EventListener<Event>, Dia
return;
}
logger.fine("DocStatus=" + DocStatus
if (logger.isLoggable(Level.FINE)) logger.fine("DocStatus=" + DocStatus
+ ", DocAction=" + DocAction + ", OrderType=" + OrderType
+ ", IsSOTrx=" + IsSOTrx + ", Processing=" + Processing
+ ", AD_Table_ID=" +gridTab.getAD_Table_ID() + ", Record_ID=" + gridTab.getRecord_ID());
@ -163,7 +164,7 @@ public class WDocActionPanel extends Window implements EventListener<Event>, Dia
if(doctypeId==null || doctypeId.intValue()==0){
doctypeId = (Integer)gridTab.getValue("C_DocTypeTarget_ID");
}
logger.fine("get doctype: " + doctypeId);
if (logger.isLoggable(Level.FINE)) logger.fine("get doctype: " + doctypeId);
if (doctypeId != null) {
index = DocumentEngine.checkActionAccess(Env.getAD_Client_ID(Env.getCtx()),
Env.getAD_Role_ID(Env.getCtx()),
@ -319,7 +320,7 @@ public class WDocActionPanel extends Window implements EventListener<Event>, Dia
{
int index = getSelectedIndex();
// Save Selection
logger.config("DocAction=" + s_value[index]);
if (logger.isLoggable(Level.CONFIG)) logger.config("DocAction=" + s_value[index]);
gridTab.setValue("DocAction", s_value[index]);
} // save

View File

@ -13,6 +13,7 @@
package org.adempiere.webui.util;
import java.util.Properties;
import java.util.logging.Level;
import org.adempiere.exceptions.AdempiereException;
import org.adempiere.webui.editor.WEditor;
@ -62,23 +63,23 @@ public class GridTabDataBinder implements ValueChangeListener {
{
if(!gridField.isEditable(true))
{
logger.config("(" + gridTab.toString() + ") " + e.getPropertyName());
if (logger.isLoggable(Level.CONFIG)) logger.config("(" + gridTab.toString() + ") " + e.getPropertyName());
return;
}
}
else if(!editor.isReadWrite())
{
logger.config("(" + gridTab.toString() + ") " + e.getPropertyName());
if (logger.isLoggable(Level.CONFIG)) logger.config("(" + gridTab.toString() + ") " + e.getPropertyName());
return;
}
}
else
{
logger.config("(" + gridTab.toString() + ") " + e.getPropertyName());
if (logger.isLoggable(Level.CONFIG)) logger.config("(" + gridTab.toString() + ") " + e.getPropertyName());
return;
}
} // processed
logger.config("(" + gridTab.toString() + ") "
if (logger.isLoggable(Level.CONFIG)) logger.config("(" + gridTab.toString() + ") "
+ e.getPropertyName() + "=" + e.getNewValue() + " (" + e.getOldValue() + ") "
+ (e.getOldValue() == null ? "" : e.getOldValue().getClass().getName()));

View File

@ -18,6 +18,7 @@
package org.adempiere.webui.window;
import java.util.Properties;
import java.util.logging.Level;
import org.compiere.util.CLogMgt;
import org.compiere.util.CLogger;
@ -119,7 +120,7 @@ public class FDialog
Properties ctx = Env.getCtx();
StringBuffer out = null;
logger.info(adMessage + " - " + message);
if (logger.isLoggable(Level.INFO)) logger.info(adMessage + " - " + message);
out = constructMessage(adMessage, message);
@ -216,7 +217,7 @@ public class FDialog
Properties ctx = Env.getCtx();
StringBuffer out = new StringBuffer();
logger.info(adMessage + " - " + message);
if (logger.isLoggable(Level.INFO)) logger.info(adMessage + " - " + message);
if (CLogMgt.isLevelFinest())
{
@ -347,7 +348,7 @@ public class FDialog
StringBuffer out = new StringBuffer();
logger.info(adMessage + " - " + message);
if (logger.isLoggable(Level.INFO)) logger.info(adMessage + " - " + message);
if (CLogMgt.isLevelFinest())
{

View File

@ -111,7 +111,7 @@ public class ReportCtl
*/
static public boolean start (IProcessUI parent, int WindowNo, ProcessInfo pi)
{
s_log.info("start - " + pi);
if (s_log.isLoggable(Level.INFO)) s_log.info("start - " + pi);
/**
* Order Print