IDEMPIERE-638 Check log level before calling logging method / log.finer
This commit is contained in:
parent
a6b7473ff4
commit
ada4a0f749
|
@ -265,12 +265,12 @@ public class ClientAcctProcessor extends SvrProcess
|
|||
m_summary.append("(Errors=").append(countError[i]).append(")");
|
||||
m_summary.append(" - ");
|
||||
StringBuilder msglog = new StringBuilder().append(getName()).append(": ").append(m_summary.toString());
|
||||
log.finer(msglog.toString());
|
||||
if (log.isLoggable(Level.FINER)) log.finer(msglog.toString());
|
||||
}
|
||||
else
|
||||
{
|
||||
StringBuilder msglog = new StringBuilder().append(getName()).append(": ").append(TableName).append(" - no work");
|
||||
log.finer(msglog.toString());
|
||||
if (log.isLoggable(Level.FINER)) log.finer(msglog.toString());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -191,7 +191,7 @@ public class BOMValidate extends SvrProcess
|
|||
MProductBOM productsBOM = productsBOMs[i];
|
||||
MProduct pp = new MProduct(getCtx(), productsBOM.getM_ProductBOM_ID(), get_TrxName());
|
||||
if (!pp.isBOM())
|
||||
log.finer(pp.getName());
|
||||
if (log.isLoggable(Level.FINER)) log.finer(pp.getName());
|
||||
else if (!validateOldProduct(pp))
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -160,7 +160,7 @@ public class BOMVerify extends SvrProcess
|
|||
MProductBOM productsBOM = productsBOMs[i];
|
||||
MProduct pp = new MProduct(getCtx(), productsBOM.getM_ProductBOM_ID(), get_TrxName());
|
||||
if (!pp.isBOM())
|
||||
log.finer(pp.getName());
|
||||
if (log.isLoggable(Level.FINER)) log.finer(pp.getName());
|
||||
else
|
||||
{
|
||||
if (validproducts.contains(pp))
|
||||
|
|
|
@ -554,7 +554,7 @@ public class ImportProduct extends SvrProcess implements ImportProcess
|
|||
try
|
||||
{
|
||||
no = pstmt_updateProduct.executeUpdate();
|
||||
log.finer("Update Product = " + no);
|
||||
if (log.isLoggable(Level.FINER)) log.finer("Update Product = " + no);
|
||||
noUpdate++;
|
||||
}
|
||||
catch (SQLException ex)
|
||||
|
@ -602,7 +602,7 @@ public class ImportProduct extends SvrProcess implements ImportProcess
|
|||
try
|
||||
{
|
||||
no = pstmt_updateProductPO.executeUpdate();
|
||||
log.finer("Update Product_PO = " + no);
|
||||
if (log.isLoggable(Level.FINER)) log.finer("Update Product_PO = " + no);
|
||||
noUpdatePO++;
|
||||
}
|
||||
catch (SQLException ex)
|
||||
|
@ -630,7 +630,7 @@ public class ImportProduct extends SvrProcess implements ImportProcess
|
|||
try
|
||||
{
|
||||
no = pstmt_insertProductPO.executeUpdate();
|
||||
log.finer("Insert Product_PO = " + no);
|
||||
if (log.isLoggable(Level.FINER)) log.finer("Insert Product_PO = " + no);
|
||||
noInsertPO++;
|
||||
}
|
||||
catch (SQLException ex)
|
||||
|
|
|
@ -166,7 +166,7 @@ public class InvoiceWriteOff extends SvrProcess
|
|||
.append(DB.TO_DATE(p_DateInvoiced_To, true));
|
||||
}
|
||||
sql.append(" AND IsPaid='N' ORDER BY C_Currency_ID, C_BPartner_ID, DateInvoiced");
|
||||
log.finer(sql.toString());
|
||||
if (log.isLoggable(Level.FINER)) log.finer(sql.toString());
|
||||
//
|
||||
int counter = 0;
|
||||
PreparedStatement pstmt = null;
|
||||
|
|
|
@ -107,7 +107,7 @@ public class TreeMaintenance extends SvrProcess
|
|||
if (C_Element_ID > 0)
|
||||
sql.append(" AND C_Element_ID=").append(C_Element_ID);
|
||||
sql.append(")");
|
||||
log.finer(sql.toString());
|
||||
if (log.isLoggable(Level.FINER)) log.finer(sql.toString());
|
||||
//
|
||||
int deletes = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||
addLog(0,null, new BigDecimal(deletes), tree.getName()+ " Deleted");
|
||||
|
@ -126,7 +126,7 @@ public class TreeMaintenance extends SvrProcess
|
|||
sql.append(" AND ").append(sourceTableKey)
|
||||
.append(" NOT IN (SELECT Node_ID FROM ").append(nodeTableName)
|
||||
.append(" WHERE AD_Tree_ID=").append(tree.getAD_Tree_ID()).append(")");
|
||||
log.finer(sql.toString());
|
||||
if (log.isLoggable(Level.FINER)) log.finer(sql.toString());
|
||||
//
|
||||
boolean ok = true;
|
||||
PreparedStatement pstmt = null;
|
||||
|
|
|
@ -59,7 +59,7 @@ public class MigrateData
|
|||
int no = DB.getSQLValue(null, sql);
|
||||
if (no > 0)
|
||||
{
|
||||
log.finer("No Need - Downloads #" + no);
|
||||
if (log.isLoggable(Level.FINER)) log.finer("No Need - Downloads #" + no);
|
||||
return;
|
||||
}
|
||||
//
|
||||
|
|
|
@ -96,7 +96,7 @@ public class Doc_InOut extends Doc
|
|||
|| line.getM_Product_ID() == 0
|
||||
|| line.getMovementQty().signum() == 0)
|
||||
{
|
||||
log.finer("Ignored: " + line);
|
||||
if (log.isLoggable(Level.FINER)) log.finer("Ignored: " + line);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
@ -256,7 +256,7 @@ public final class Fact
|
|||
BigDecimal balance = getSourceBalance();
|
||||
boolean retValue = balance.signum() == 0;
|
||||
if (retValue)
|
||||
log.finer(toString());
|
||||
if (log.isLoggable(Level.FINER)) log.finer(toString());
|
||||
else
|
||||
log.warning ("NO - Diff=" + balance + " - " + toString());
|
||||
return retValue;
|
||||
|
@ -290,7 +290,7 @@ public final class Fact
|
|||
if (!m_acctSchema.isSuspenseBalancing() || m_doc.isMultiCurrency())
|
||||
return null;
|
||||
BigDecimal diff = getSourceBalance();
|
||||
log.finer("Diff=" + diff);
|
||||
if (log.isLoggable(Level.FINER)) log.finer("Diff=" + diff);
|
||||
|
||||
// new line
|
||||
FactLine line = new FactLine (m_doc.getCtx(), m_doc.get_Table_ID(),
|
||||
|
@ -376,10 +376,10 @@ public final class Fact
|
|||
}
|
||||
}
|
||||
map.clear();
|
||||
log.finer("(" + segmentType + ") - " + toString());
|
||||
if (log.isLoggable(Level.FINER)) log.finer("(" + segmentType + ") - " + toString());
|
||||
return true;
|
||||
}
|
||||
log.finer("(" + segmentType + ") (not checked) - " + toString());
|
||||
if (log.isLoggable(Level.FINER)) log.finer("(" + segmentType + ") (not checked) - " + toString());
|
||||
return true;
|
||||
} // isSegmentBalanced
|
||||
|
||||
|
@ -501,7 +501,7 @@ public final class Fact
|
|||
BigDecimal balance = getAcctBalance();
|
||||
boolean retValue = balance.signum() == 0;
|
||||
if (retValue)
|
||||
log.finer(toString());
|
||||
if (log.isLoggable(Level.FINER)) log.finer(toString());
|
||||
else
|
||||
log.warning("NO - Diff=" + balance + " - " + toString());
|
||||
return retValue;
|
||||
|
|
|
@ -777,7 +777,7 @@ public final class FactLine extends X_Fact_Acct
|
|||
if (rs.next())
|
||||
{
|
||||
setAD_Org_ID (rs.getInt(1));
|
||||
log.finer("AD_Org_ID=" + super.getAD_Org_ID() + " (1 from M_Locator_ID=" + getM_Locator_ID() + ")");
|
||||
if (log.isLoggable(Level.FINER)) log.finer("AD_Org_ID=" + super.getAD_Org_ID() + " (1 from M_Locator_ID=" + getM_Locator_ID() + ")");
|
||||
}
|
||||
else
|
||||
log.log(Level.SEVERE, "AD_Org_ID - Did not find M_Locator_ID=" + getM_Locator_ID());
|
||||
|
@ -796,7 +796,7 @@ public final class FactLine extends X_Fact_Acct
|
|||
if (m_docLine != null && super.getAD_Org_ID() == 0)
|
||||
{
|
||||
setAD_Org_ID (m_docLine.getAD_Org_ID());
|
||||
log.finer("AD_Org_ID=" + super.getAD_Org_ID() + " (2 from DocumentLine)");
|
||||
if (log.isLoggable(Level.FINER)) log.finer("AD_Org_ID=" + super.getAD_Org_ID() + " (2 from DocumentLine)");
|
||||
}
|
||||
// Prio 3 - get from doc - if not GL
|
||||
if (m_doc != null && super.getAD_Org_ID() == 0)
|
||||
|
@ -804,12 +804,12 @@ public final class FactLine extends X_Fact_Acct
|
|||
if (Doc.DOCTYPE_GLJournal.equals (m_doc.getDocumentType()))
|
||||
{
|
||||
setAD_Org_ID (m_acct.getAD_Org_ID()); // inter-company GL
|
||||
log.finer("AD_Org_ID=" + super.getAD_Org_ID() + " (3 from Acct)");
|
||||
if (log.isLoggable(Level.FINER)) log.finer("AD_Org_ID=" + super.getAD_Org_ID() + " (3 from Acct)");
|
||||
}
|
||||
else
|
||||
{
|
||||
setAD_Org_ID (m_doc.getAD_Org_ID());
|
||||
log.finer("AD_Org_ID=" + super.getAD_Org_ID() + " (3 from Document)");
|
||||
if (log.isLoggable(Level.FINER)) log.finer("AD_Org_ID=" + super.getAD_Org_ID() + " (3 from Document)");
|
||||
}
|
||||
}
|
||||
// Prio 4 - get from account - if not GL
|
||||
|
@ -818,12 +818,12 @@ public final class FactLine extends X_Fact_Acct
|
|||
if (Doc.DOCTYPE_GLJournal.equals (m_doc.getDocumentType()))
|
||||
{
|
||||
setAD_Org_ID (m_doc.getAD_Org_ID());
|
||||
log.finer("AD_Org_ID=" + super.getAD_Org_ID() + " (4 from Document)");
|
||||
if (log.isLoggable(Level.FINER)) log.finer("AD_Org_ID=" + super.getAD_Org_ID() + " (4 from Document)");
|
||||
}
|
||||
else
|
||||
{
|
||||
setAD_Org_ID (m_acct.getAD_Org_ID());
|
||||
log.finer("AD_Org_ID=" + super.getAD_Org_ID() + " (4 from Acct)");
|
||||
if (log.isLoggable(Level.FINER)) log.finer("AD_Org_ID=" + super.getAD_Org_ID() + " (4 from Acct)");
|
||||
}
|
||||
}
|
||||
return super.getAD_Org_ID();
|
||||
|
|
|
@ -32,6 +32,7 @@ import java.util.ArrayList;
|
|||
import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
import java.util.Vector;
|
||||
import java.util.logging.Level;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
|
@ -123,7 +124,7 @@ public abstract class Convert
|
|||
if (statement.length() == 0)
|
||||
{
|
||||
if (m_verbose)
|
||||
log.finer("Skipping empty (" + i + ")");
|
||||
if (log.isLoggable(Level.FINER)) log.finer("Skipping empty (" + i + ")");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -624,10 +624,10 @@ public final class ImpFormat
|
|||
log.log(Level.SEVERE, "Insert records=" + no + "; SQL=" + sql.toString());
|
||||
return false;
|
||||
}
|
||||
log.finer("New ID=" + ID + " " + find);
|
||||
if (log.isLoggable(Level.FINER)) log.finer("New ID=" + ID + " " + find);
|
||||
}
|
||||
else
|
||||
log.finer("Old ID=" + ID + " " + find);
|
||||
if (log.isLoggable(Level.FINER)) log.finer("Old ID=" + ID + " " + find);
|
||||
|
||||
// Update Info -------------------------------------------------------
|
||||
sql = new StringBuilder ("UPDATE ")
|
||||
|
|
|
@ -301,7 +301,7 @@ public class GridField
|
|||
StringBuilder sb = new StringBuilder();
|
||||
for (int i = 0; i < list.size(); i++)
|
||||
sb.append(list.get(i)).append(" ");
|
||||
log.finer("(" + m_vo.ColumnName + ") " + sb.toString());
|
||||
if (log.isLoggable(Level.FINER)) log.finer("(" + m_vo.ColumnName + ") " + sb.toString());
|
||||
}
|
||||
return list;
|
||||
} // getDependentOn
|
||||
|
|
|
@ -466,7 +466,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
|
|||
StringBuilder sb = new StringBuilder();
|
||||
for (int i = 0; i < list.size(); i++)
|
||||
sb.append(list.get(i)).append(" ");
|
||||
log.finer("(" + m_vo.Name + ") " + sb.toString());
|
||||
if (log.isLoggable(Level.FINER)) log.finer("(" + m_vo.Name + ") " + sb.toString());
|
||||
}
|
||||
return list;
|
||||
} // getDependentOn
|
||||
|
|
|
@ -876,7 +876,7 @@ public class MCostDetail extends X_M_CostDetail
|
|||
if (ce.isAveragePO())
|
||||
{
|
||||
cost.setWeightedAverage(amt, qty);
|
||||
log.finer("PO - AveragePO - " + cost);
|
||||
if (log.isLoggable(Level.FINER)) log.finer("PO - AveragePO - " + cost);
|
||||
}
|
||||
else if (ce.isLastPOPrice())
|
||||
{
|
||||
|
@ -891,7 +891,7 @@ public class MCostDetail extends X_M_CostDetail
|
|||
}
|
||||
}
|
||||
cost.add(amt, qty);
|
||||
log.finer("PO - LastPO - " + cost);
|
||||
if (log.isLoggable(Level.FINER)) log.finer("PO - LastPO - " + cost);
|
||||
}
|
||||
else if (ce.isStandardCosting())
|
||||
{
|
||||
|
@ -908,16 +908,16 @@ public class MCostDetail extends X_M_CostDetail
|
|||
if (log.isLoggable(Level.FINEST)) log.finest("PO - Standard - CurrentCostPrice(seed)="+cost.getCurrentCostPrice()+", price="+price);
|
||||
}
|
||||
cost.add(amt, qty);
|
||||
log.finer("PO - Standard - " + cost);
|
||||
if (log.isLoggable(Level.FINER)) log.finer("PO - Standard - " + cost);
|
||||
}
|
||||
else if (ce.isUserDefined())
|
||||
{
|
||||
// Interface
|
||||
log.finer("PO - UserDef - " + cost);
|
||||
if (log.isLoggable(Level.FINER)) log.finer("PO - UserDef - " + cost);
|
||||
}
|
||||
else if (!ce.isCostingMethod())
|
||||
{
|
||||
log.finer("PO - " + ce + " - " + cost);
|
||||
if (log.isLoggable(Level.FINER)) log.finer("PO - " + ce + " - " + cost);
|
||||
}
|
||||
// else
|
||||
// log.warning("PO - " + ce + " - " + cost);
|
||||
|
@ -931,7 +931,7 @@ public class MCostDetail extends X_M_CostDetail
|
|||
if (ce.isAverageInvoice())
|
||||
{
|
||||
cost.setWeightedAverage(amt, qty);
|
||||
log.finer("Inv - AverageInv - " + cost);
|
||||
if (log.isLoggable(Level.FINER)) log.finer("Inv - AverageInv - " + cost);
|
||||
}
|
||||
else if (ce.isFifo()
|
||||
|| ce.isLifo())
|
||||
|
@ -947,7 +947,7 @@ public class MCostDetail extends X_M_CostDetail
|
|||
if (cQueue != null && cQueue.length > 0)
|
||||
cost.setCurrentCostPrice(cQueue[0].getCurrentCostPrice());
|
||||
cost.add(amt, qty);
|
||||
log.finer("Inv - FiFo/LiFo - " + cost);
|
||||
if (log.isLoggable(Level.FINER)) log.finer("Inv - FiFo/LiFo - " + cost);
|
||||
}
|
||||
else if (ce.isLastInvoice())
|
||||
{
|
||||
|
@ -962,7 +962,7 @@ public class MCostDetail extends X_M_CostDetail
|
|||
}
|
||||
}
|
||||
cost.add(amt, qty);
|
||||
log.finer("Inv - LastInv - " + cost);
|
||||
if (log.isLoggable(Level.FINER)) log.finer("Inv - LastInv - " + cost);
|
||||
}
|
||||
else if (ce.isStandardCosting())
|
||||
{
|
||||
|
@ -980,13 +980,13 @@ public class MCostDetail extends X_M_CostDetail
|
|||
}
|
||||
cost.add(amt, qty);
|
||||
}
|
||||
log.finer("Inv - Standard - " + cost);
|
||||
if (log.isLoggable(Level.FINER)) log.finer("Inv - Standard - " + cost);
|
||||
}
|
||||
else if (ce.isUserDefined())
|
||||
{
|
||||
// Interface
|
||||
cost.add(amt, qty);
|
||||
log.finer("Inv - UserDef - " + cost);
|
||||
if (log.isLoggable(Level.FINER)) log.finer("Inv - UserDef - " + cost);
|
||||
}
|
||||
else if (!ce.isCostingMethod()) // Cost Adjustments
|
||||
{
|
||||
|
@ -1031,7 +1031,7 @@ public class MCostDetail extends X_M_CostDetail
|
|||
cost.add(amt, qty);
|
||||
}
|
||||
// end AZ
|
||||
log.finer("Inv - Landed Costs - " + cost);
|
||||
if (log.isLoggable(Level.FINER)) log.finer("Inv - Landed Costs - " + cost);
|
||||
}
|
||||
// else
|
||||
// log.warning("Inv - " + ce + " - " + cost);
|
||||
|
@ -1061,7 +1061,7 @@ public class MCostDetail extends X_M_CostDetail
|
|||
}
|
||||
else
|
||||
cost.setCurrentQty(cost.getCurrentQty().add(qty));
|
||||
log.finer("QtyAdjust - AverageInv - " + cost);
|
||||
if (log.isLoggable(Level.FINER)) log.finer("QtyAdjust - AverageInv - " + cost);
|
||||
}
|
||||
else if (ce.isAveragePO())
|
||||
{
|
||||
|
@ -1077,7 +1077,7 @@ public class MCostDetail extends X_M_CostDetail
|
|||
}
|
||||
else
|
||||
cost.setCurrentQty(cost.getCurrentQty().add(qty));
|
||||
log.finer("QtyAdjust - AveragePO - " + cost);
|
||||
if (log.isLoggable(Level.FINER)) log.finer("QtyAdjust - AveragePO - " + cost);
|
||||
}
|
||||
else if (ce.isFifo() || ce.isLifo())
|
||||
{
|
||||
|
@ -1101,17 +1101,17 @@ public class MCostDetail extends X_M_CostDetail
|
|||
if (cQueue != null && cQueue.length > 0)
|
||||
cost.setCurrentCostPrice(cQueue[0].getCurrentCostPrice());
|
||||
cost.setCurrentQty(cost.getCurrentQty().add(qty));
|
||||
log.finer("QtyAdjust - FiFo/Lifo - " + cost);
|
||||
if (log.isLoggable(Level.FINER)) log.finer("QtyAdjust - FiFo/Lifo - " + cost);
|
||||
}
|
||||
else if (ce.isLastInvoice())
|
||||
{
|
||||
cost.setCurrentQty(cost.getCurrentQty().add(qty));
|
||||
log.finer("QtyAdjust - LastInv - " + cost);
|
||||
if (log.isLoggable(Level.FINER)) log.finer("QtyAdjust - LastInv - " + cost);
|
||||
}
|
||||
else if (ce.isLastPOPrice())
|
||||
{
|
||||
cost.setCurrentQty(cost.getCurrentQty().add(qty));
|
||||
log.finer("QtyAdjust - LastPO - " + cost);
|
||||
if (log.isLoggable(Level.FINER)) log.finer("QtyAdjust - LastPO - " + cost);
|
||||
}
|
||||
else if (ce.isStandardCosting())
|
||||
{
|
||||
|
@ -1131,7 +1131,7 @@ public class MCostDetail extends X_M_CostDetail
|
|||
{
|
||||
cost.setCurrentQty(cost.getCurrentQty().add(qty));
|
||||
}
|
||||
log.finer("QtyAdjust - Standard - " + cost);
|
||||
if (log.isLoggable(Level.FINER)) log.finer("QtyAdjust - Standard - " + cost);
|
||||
}
|
||||
else if (ce.isUserDefined())
|
||||
{
|
||||
|
@ -1140,12 +1140,12 @@ public class MCostDetail extends X_M_CostDetail
|
|||
cost.add(amt, qty);
|
||||
else
|
||||
cost.setCurrentQty(cost.getCurrentQty().add(qty));
|
||||
log.finer("QtyAdjust - UserDef - " + cost);
|
||||
if (log.isLoggable(Level.FINER)) log.finer("QtyAdjust - UserDef - " + cost);
|
||||
}
|
||||
else if (!ce.isCostingMethod())
|
||||
{
|
||||
// Should not happen
|
||||
log.finer("QtyAdjust - ?none? - " + cost);
|
||||
if (log.isLoggable(Level.FINER)) log.finer("QtyAdjust - ?none? - " + cost);
|
||||
}
|
||||
else
|
||||
log.warning("QtyAdjust - " + ce + " - " + cost);
|
||||
|
|
|
@ -244,9 +244,9 @@ public class MDiscountSchema extends X_M_DiscountSchema
|
|||
getBreaks(false);
|
||||
BigDecimal Amt = Price.multiply(Qty);
|
||||
if (isQuantityBased())
|
||||
log.finer("Qty=" + Qty + ",M_Product_ID=" + M_Product_ID + ",M_Product_Category_ID=" + M_Product_Category_ID);
|
||||
if (log.isLoggable(Level.FINER)) log.finer("Qty=" + Qty + ",M_Product_ID=" + M_Product_ID + ",M_Product_Category_ID=" + M_Product_Category_ID);
|
||||
else
|
||||
log.finer("Amt=" + Amt + ",M_Product_ID=" + M_Product_ID + ",M_Product_Category_ID=" + M_Product_Category_ID);
|
||||
if (log.isLoggable(Level.FINER)) log.finer("Amt=" + Amt + ",M_Product_ID=" + M_Product_ID + ",M_Product_Category_ID=" + M_Product_Category_ID);
|
||||
for (int i = 0; i < m_breaks.length; i++)
|
||||
{
|
||||
MDiscountSchemaBreak br = m_breaks[i];
|
||||
|
@ -257,19 +257,19 @@ public class MDiscountSchema extends X_M_DiscountSchema
|
|||
{
|
||||
if (!br.applies(Qty, M_Product_ID, M_Product_Category_ID))
|
||||
{
|
||||
log.finer("No: " + br);
|
||||
if (log.isLoggable(Level.FINER)) log.finer("No: " + br);
|
||||
continue;
|
||||
}
|
||||
log.finer("Yes: " + br);
|
||||
if (log.isLoggable(Level.FINER)) log.finer("Yes: " + br);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!br.applies(Amt, M_Product_ID, M_Product_Category_ID))
|
||||
{
|
||||
log.finer("No: " + br);
|
||||
if (log.isLoggable(Level.FINER)) log.finer("No: " + br);
|
||||
continue;
|
||||
}
|
||||
log.finer("Yes: " + br);
|
||||
if (log.isLoggable(Level.FINER)) log.finer("Yes: " + br);
|
||||
}
|
||||
|
||||
// Line applies
|
||||
|
|
|
@ -204,7 +204,7 @@ public final class MLookup extends Lookup implements Serializable
|
|||
// Not found and waiting for loader
|
||||
if (m_loaderFuture != null && !m_loaderFuture.isDone())
|
||||
{
|
||||
log.finer((m_info.KeyColumn==null ? "ID="+m_info.Column_ID : m_info.KeyColumn) + ": waiting for Loader");
|
||||
if (log.isLoggable(Level.FINER)) log.finer((m_info.KeyColumn==null ? "ID="+m_info.Column_ID : m_info.KeyColumn) + ": waiting for Loader");
|
||||
loadComplete();
|
||||
// is most current
|
||||
retValue = (NamePair)m_lookup.get(key);
|
||||
|
@ -482,7 +482,7 @@ public final class MLookup extends Lookup implements Serializable
|
|||
if (directValue != null)
|
||||
return directValue;
|
||||
}
|
||||
log.finer(m_info.KeyColumn + ": " + key
|
||||
if (log.isLoggable(Level.FINER)) log.finer(m_info.KeyColumn + ": " + key
|
||||
+ ", SaveInCache=" + saveInCache + ",Local=" + cacheLocal);
|
||||
boolean isNumber = m_info.KeyColumn.endsWith("_ID");
|
||||
PreparedStatement pstmt = null;
|
||||
|
@ -761,7 +761,7 @@ public final class MLookup extends Lookup implements Serializable
|
|||
}
|
||||
//
|
||||
if (CLogMgt.isLevelFiner())
|
||||
log.finer(m_info.Column_ID + ", " + m_info.KeyColumn + ": " + sql.toString());
|
||||
if (log.isLoggable(Level.FINER)) log.finer(m_info.Column_ID + ", " + m_info.KeyColumn + ": " + sql.toString());
|
||||
if (CLogMgt.isLevelFinest())
|
||||
if (log.isLoggable(Level.FINEST)) log.finest(m_info.KeyColumn + ": " + sql);
|
||||
|
||||
|
@ -843,7 +843,7 @@ public final class MLookup extends Lookup implements Serializable
|
|||
DB.close(rs, pstmt);
|
||||
}
|
||||
int size = m_lookup.size();
|
||||
log.finer(m_info.KeyColumn
|
||||
if (log.isLoggable(Level.FINER)) log.finer(m_info.KeyColumn
|
||||
+ " (" + m_info.Column_ID + "):"
|
||||
// + " ID=" + m_info.AD_Column_ID + " " +
|
||||
+ " - Loader complete #" + size + " - all=" + m_allLoaded
|
||||
|
|
|
@ -1112,7 +1112,7 @@ public class MRequest extends X_R_Request
|
|||
message.append("\n----------\n").append(getResult());
|
||||
message.append(getMailTrailer(null));
|
||||
File pdf = createPDF();
|
||||
log.finer(message.toString());
|
||||
if (log.isLoggable(Level.FINER)) log.finer(message.toString());
|
||||
|
||||
// Prepare sending Notice/Mail
|
||||
MClient client = MClient.get(getCtx());
|
||||
|
|
|
@ -759,7 +759,7 @@ public abstract class PO
|
|||
throw new IllegalArgumentException (ColumnName + " is mandatory.");
|
||||
}
|
||||
m_newValues[index] = Null.NULL; // correct
|
||||
log.finer(ColumnName + " = null");
|
||||
if (log.isLoggable(Level.FINER)) log.finer(ColumnName + " = null");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -198,7 +198,7 @@ public class ScheduleUtil
|
|||
TimeUtil.getNextDay(date), // user entered date need to convert to not including end time
|
||||
Msg.getMsg(m_ctx, "NonBusinessDay"), rs.getString(1),
|
||||
MAssignmentSlot.STATUS_NonBusinessDay);
|
||||
log.finer("- NonBusinessDay " + ma);
|
||||
if (log.isLoggable(Level.FINER)) log.finer("- NonBusinessDay " + ma);
|
||||
list.add(ma);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -490,8 +490,10 @@ public class Tax
|
|||
MTax[] taxes = MTax.getAll (ctx);
|
||||
MLocation lFrom = new MLocation (ctx, billFromC_Location_ID, null);
|
||||
MLocation lTo = new MLocation (ctx, billToC_Location_ID, null);
|
||||
log.finer("From=" + lFrom);
|
||||
log.finer("To=" + lTo);
|
||||
if (log.isLoggable(Level.FINER)){
|
||||
log.finer("From=" + lFrom);
|
||||
log.finer("To=" + lTo);
|
||||
}
|
||||
|
||||
for (int i = 0; i < taxes.length; i++)
|
||||
{
|
||||
|
|
|
@ -155,7 +155,7 @@ public class MPrintPaper extends X_AD_PrintPaper
|
|||
if (name.equalsIgnoreCase(nameCode))
|
||||
{
|
||||
nameMedia = (MediaSizeName)msn.getEnumValueTable()[i];
|
||||
log.finer("Name=" + nameMedia);
|
||||
if (log.isLoggable(Level.FINER)) log.finer("Name=" + nameMedia);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -605,8 +605,7 @@ public class LayoutEngine implements Pageable, Printable, Doc
|
|||
m_position[AREA_CONTENT].setLocation(m_content.x, m_content.y);
|
||||
m_position[AREA_FOOTER].setLocation(m_footer.x, m_footer.y);
|
||||
m_maxHeightSinceNewLine = new float[] {0f, 0f, 0f};
|
||||
if (log.isLoggable(Level.FINE))
|
||||
log.finer("Page=" + m_pageNo);
|
||||
if (log.isLoggable(Level.FINER)) log.finer("Page=" + m_pageNo);
|
||||
return m_pageNo;
|
||||
} // newPage
|
||||
|
||||
|
|
|
@ -1270,7 +1270,7 @@ public class TableElement extends PrintElement
|
|||
float netHeight = rowHeight - (4*m_tFormat.getLineStroke().floatValue()) + (2*V_GAP);
|
||||
|
||||
if (DEBUG_PRINT)
|
||||
log.finer("#" + col + " - x=" + curX + ", y=" + curY
|
||||
if (log.isLoggable(Level.FINER)) log.finer("#" + col + " - x=" + curX + ", y=" + curY
|
||||
+ ", width=" + colWidth + "/" + netWidth + ", HeaderHeight=" + rowHeight + "/" + netHeight);
|
||||
String alignment = m_columnJustification[col];
|
||||
|
||||
|
|
|
@ -654,7 +654,7 @@ public class Language implements Serializable
|
|||
{
|
||||
SimpleDateFormat retValue = (SimpleDateFormat)DateFormat.getDateTimeInstance
|
||||
(DateFormat.MEDIUM, DateFormat.LONG, m_locale);
|
||||
// log.finer("Pattern=" + retValue.toLocalizedPattern() + ", Loc=" + retValue.toLocalizedPattern());
|
||||
// if (log.isLoggable(Level.FINER)) log.finer("Pattern=" + retValue.toLocalizedPattern() + ", Loc=" + retValue.toLocalizedPattern());
|
||||
return retValue;
|
||||
} // getDateTimeFormat
|
||||
|
||||
|
|
|
@ -316,7 +316,7 @@ public class WebEnv
|
|||
first = false;
|
||||
String key = e.nextElement();
|
||||
Object value = config.getInitParameter(key);
|
||||
log.finer("- " + key + " = " + value);
|
||||
if (log.isLoggable(Level.FINER)) log.finer("- " + key + " = " + value);
|
||||
}
|
||||
} // dump (ServletConfig)
|
||||
|
||||
|
@ -339,7 +339,7 @@ public class WebEnv
|
|||
first = false;
|
||||
String key = e.nextElement();
|
||||
Object value = ctx.getInitParameter(key);
|
||||
log.finer("- " + key + " = " + value);
|
||||
if (log.isLoggable(Level.FINER)) log.finer("- " + key + " = " + value);
|
||||
}
|
||||
first = true;
|
||||
e = ctx.getAttributeNames();
|
||||
|
@ -350,7 +350,7 @@ public class WebEnv
|
|||
first = false;
|
||||
String key = e.nextElement();
|
||||
Object value = ctx.getAttribute(key);
|
||||
log.finer("- " + key + " = " + value);
|
||||
if (log.isLoggable(Level.FINER)) log.finer("- " + key + " = " + value);
|
||||
}
|
||||
} // dump
|
||||
|
||||
|
@ -373,7 +373,7 @@ public class WebEnv
|
|||
first = false;
|
||||
String key = e.nextElement();
|
||||
Object value = session.getAttribute(key);
|
||||
log.finer("- " + key + " = " + value);
|
||||
if (log.isLoggable(Level.FINER)) log.finer("- " + key + " = " + value);
|
||||
}
|
||||
} // dump (session)
|
||||
|
||||
|
@ -384,7 +384,7 @@ public class WebEnv
|
|||
public static void dump (HttpServletRequest request)
|
||||
{
|
||||
if (log.isLoggable(Level.CONFIG)) log.config("Request " + request.getProtocol() + " " + request.getMethod());
|
||||
if (!CLogMgt.isLevelFiner())
|
||||
if (!log.isLoggable(Level.FINER))
|
||||
return;
|
||||
log.finer("- Server=" + request.getServerName() + ", Port=" + request.getServerPort());
|
||||
log.finer("- ContextPath=" + request.getContextPath()
|
||||
|
|
|
@ -307,7 +307,7 @@ public abstract class AbstractElementHandler implements ElementHandler {
|
|||
}
|
||||
source.close();
|
||||
target.close();
|
||||
log.finer("Successfully copied " + byteCount + " bytes.");
|
||||
if (log.isLoggable(Level.FINER)) log.finer("Successfully copied " + byteCount + " bytes.");
|
||||
}
|
||||
catch (Exception e) {
|
||||
log.log(Level.SEVERE, e.getLocalizedMessage(), e);
|
||||
|
|
|
@ -227,10 +227,10 @@ public class AcctProcessor extends AdempiereServer
|
|||
if (countError[i] > 0)
|
||||
m_summary.append("(Errors=").append(countError[i]).append(")");
|
||||
m_summary.append(" - ");
|
||||
log.finer(getName() + ": " + m_summary.toString());
|
||||
if (log.isLoggable(Level.FINER)) log.finer(getName() + ": " + m_summary.toString());
|
||||
}
|
||||
else
|
||||
log.finer(getName() + ": " + TableName + " - no work");
|
||||
if (log.isLoggable(Level.FINER)) log.finer(getName() + ": " + TableName + " - no work");
|
||||
}
|
||||
|
||||
} // postSession
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
package org.compiere.apps;
|
||||
|
||||
import java.awt.Container;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import javax.swing.JFrame;
|
||||
import javax.swing.SwingUtilities;
|
||||
|
@ -284,7 +285,7 @@ public class ProcessCtl extends AbstractProcessCtl
|
|||
m_waiting = null;
|
||||
|
||||
String summary = pi.getSummary();
|
||||
log.finer("unlock - " + summary);
|
||||
if (log.isLoggable(Level.FINER)) log.finer("unlock - " + summary);
|
||||
if (summary != null && summary.indexOf('@') != -1)
|
||||
pi.setSummary(Msg.parseTranslation(Env.getCtx(), summary));
|
||||
parent.unlockUI(pi);
|
||||
|
|
|
@ -21,6 +21,7 @@ import java.math.BigDecimal;
|
|||
import java.sql.PreparedStatement;
|
||||
import java.sql.SQLException;
|
||||
import java.sql.Timestamp;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import org.adempiere.plaf.AdempierePLAF;
|
||||
import org.compiere.apps.ALayout;
|
||||
|
@ -288,7 +289,7 @@ public class InfoOrder extends Info
|
|||
}
|
||||
sql.append(" AND o.IsSOTrx=?");
|
||||
|
||||
log.finer(sql.toString());
|
||||
if (log.isLoggable(Level.FINER)) log.finer(sql.toString());
|
||||
return sql.toString();
|
||||
} // getSQLWhere
|
||||
|
||||
|
|
|
@ -34,6 +34,7 @@ import java.text.AttributedString;
|
|||
import java.text.DateFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.GregorianCalendar;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import javax.swing.JComponent;
|
||||
|
||||
|
@ -355,7 +356,7 @@ public class VSchedulePanel extends JComponent implements MouseListener
|
|||
if (e.getClickCount() < 2)
|
||||
return;
|
||||
|
||||
log.finer(e.toString());
|
||||
if (log.isLoggable(Level.FINER)) log.finer(e.toString());
|
||||
Rectangle hitRect = new Rectangle (e.getX()-1, e.getY()-1, 3, 3);
|
||||
|
||||
// Day
|
||||
|
|
|
@ -225,7 +225,7 @@ public final class VCellEditor extends AbstractCellEditor
|
|||
*/
|
||||
public void actionPerformed (ActionEvent e)
|
||||
{
|
||||
log.finer(m_mField.getColumnName() + ": Value=" + m_editor.getValue());
|
||||
if (log.isLoggable(Level.FINER)) log.finer(m_mField.getColumnName() + ": Value=" + m_editor.getValue());
|
||||
if (e.getSource() == m_editor && actionListener != null)
|
||||
actionListener.actionPerformed(e);
|
||||
} // actionPerformed
|
||||
|
|
|
@ -192,7 +192,7 @@ public class MiniTable extends CTable implements IMiniTable
|
|||
tc.setPreferredWidth(width);
|
||||
// log.fine( "width=" + width);
|
||||
} // for all columns
|
||||
log.finer("Cols=" + size + " - " + (System.currentTimeMillis()-start) + "ms");
|
||||
if (log.isLoggable(Level.FINER)) log.finer("Cols=" + size + " - " + (System.currentTimeMillis()-start) + "ms");
|
||||
} // autoSize
|
||||
|
||||
|
||||
|
|
|
@ -22,6 +22,7 @@ import java.sql.PreparedStatement;
|
|||
import java.sql.SQLException;
|
||||
import java.sql.Timestamp;
|
||||
import java.util.Date;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import org.adempiere.webui.AdempiereWebUI;
|
||||
import org.adempiere.webui.apps.AEnv;
|
||||
|
@ -398,7 +399,7 @@ public class InfoInvoicePanel extends InfoPanel implements ValueChangeListener
|
|||
}
|
||||
sql.append(" AND i.IsPaid=? AND i.IsSOTrx=?");
|
||||
|
||||
log.finer(sql.toString());
|
||||
if (log.isLoggable(Level.FINER)) log.finer(sql.toString());
|
||||
return sql.toString();
|
||||
}
|
||||
|
||||
|
|
|
@ -22,6 +22,7 @@ import java.sql.PreparedStatement;
|
|||
import java.sql.SQLException;
|
||||
import java.sql.Timestamp;
|
||||
import java.util.Date;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import org.adempiere.webui.AdempiereWebUI;
|
||||
import org.adempiere.webui.apps.AEnv;
|
||||
|
@ -373,7 +374,7 @@ public class InfoOrderPanel extends InfoPanel implements ValueChangeListener
|
|||
}
|
||||
sql.append(" AND o.IsSOTrx=?");
|
||||
|
||||
log.finer(sql.toString());
|
||||
if (log.isLoggable(Level.FINER)) log.finer(sql.toString());
|
||||
return sql.toString();
|
||||
}
|
||||
|
||||
|
|
|
@ -179,7 +179,7 @@ public abstract class CreateFrom implements ICreateFrom
|
|||
+ "l.M_Product_ID,COALESCE(p.Name,c.Name), l.Line,l.C_OrderLine_ID "
|
||||
+ "ORDER BY l.Line");
|
||||
//
|
||||
log.finer(sql.toString());
|
||||
if (log.isLoggable(Level.FINER)) log.finer(sql.toString());
|
||||
PreparedStatement pstmt = null;
|
||||
ResultSet rs = null;
|
||||
try
|
||||
|
|
|
@ -219,7 +219,7 @@ public abstract class CreateFromShipment extends CreateFrom
|
|||
+ "l.M_Product_ID,COALESCE(p.Name,c.Name), l.Line,l.C_OrderLine_ID "
|
||||
+ "ORDER BY l.Line");
|
||||
//
|
||||
log.finer(sql.toString());
|
||||
if (log.isLoggable(Level.FINER)) log.finer(sql.toString());
|
||||
PreparedStatement pstmt = null;
|
||||
ResultSet rs = null;
|
||||
try
|
||||
|
|
|
@ -130,12 +130,12 @@ public class LoginLinkTag extends TagSupport
|
|||
// Check Cookie
|
||||
String cookieUser = JSPEnv.getCookieWebUser ((HttpServletRequest)pageContext.getRequest());
|
||||
if (cookieUser == null || cookieUser.trim().length() == 0)
|
||||
log.finer ("(" + address + ") - no cookie");
|
||||
if (log.isLoggable(Level.FINER)) log.finer ("(" + address + ") - no cookie");
|
||||
else
|
||||
{
|
||||
// Try to Load
|
||||
wu = WebUser.get (ctx, cookieUser);
|
||||
log.finer ("(" + address + ") - Cookie: " + wu);
|
||||
if (log.isLoggable(Level.FINER)) log.finer ("(" + address + ") - Cookie: " + wu);
|
||||
}
|
||||
if (wu != null)
|
||||
return wu;
|
||||
|
|
|
@ -113,7 +113,7 @@ public class PriceList
|
|||
private PriceList (Properties ctx, int AD_Client_ID, int M_PriceList_ID,
|
||||
String searchString, int M_Product_Category_ID, boolean allRecords)
|
||||
{
|
||||
log.finer("AD_Client_ID=" + AD_Client_ID + ", M_PriceList_ID=" + M_PriceList_ID
|
||||
if (log.isLoggable(Level.FINER)) log.finer("AD_Client_ID=" + AD_Client_ID + ", M_PriceList_ID=" + M_PriceList_ID
|
||||
+ ", Search=" + searchString + ",M_Product_Category_ID=" + M_Product_Category_ID
|
||||
+ ", All=" + allRecords);
|
||||
m_ctx = ctx;
|
||||
|
@ -256,7 +256,7 @@ public class PriceList
|
|||
private void loadProducts (String searchString, int M_Product_Category_ID, boolean allRecords)
|
||||
{
|
||||
// Set Search String
|
||||
log.finer("loadProducts - M_PriceList_Version_ID=" + m_PriceList_Version_ID
|
||||
if (log.isLoggable(Level.FINER)) log.finer("loadProducts - M_PriceList_Version_ID=" + m_PriceList_Version_ID
|
||||
+ ", Search=" + searchString + ", M_Product_Category_ID=" + M_Product_Category_ID);
|
||||
m_searchInfo = "";
|
||||
if (searchString != null)
|
||||
|
|
|
@ -98,9 +98,9 @@ public class StoreFilter implements javax.servlet.Filter
|
|||
if (enc == null)
|
||||
request.setCharacterEncoding(WebEnv.ENCODING);
|
||||
if (enc == null)
|
||||
log.finer("Checked=" + uri);
|
||||
if (log.isLoggable(Level.FINER)) log.finer("Checked=" + uri);
|
||||
else
|
||||
log.finer("Checked=" + uri + " - Enc=" + enc);
|
||||
if (log.isLoggable(Level.FINER)) log.finer("Checked=" + uri + " - Enc=" + enc);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
|
|
@ -523,7 +523,7 @@ public class ConfigOracle implements IDatabaseConfig
|
|||
{
|
||||
log.warning(ex.toString());
|
||||
}
|
||||
log.finer(sbOut.toString());
|
||||
if (log.isLoggable(Level.FINER)) log.finer(sbOut.toString());
|
||||
if (sbErr.length() > 0)
|
||||
log.warning(sbErr.toString());
|
||||
return result == 0;
|
||||
|
|
Loading…
Reference in New Issue