diff --git a/org.adempiere.base.callout/src/org/compiere/model/CalloutInOut.java b/org.adempiere.base.callout/src/org/compiere/model/CalloutInOut.java index 86706671b2..c2e534e419 100644 --- a/org.adempiere.base.callout/src/org/compiere/model/CalloutInOut.java +++ b/org.adempiere.base.callout/src/org/compiere/model/CalloutInOut.java @@ -361,7 +361,7 @@ public class CalloutInOut extends CalloutEngine Env.setContext(ctx, WindowNo, 0, "M_Locator_ID", null); else { - log.config("M_Locator_ID=" + ii); + if (log.isLoggable(Level.CONFIG)) log.config("M_Locator_ID=" + ii); Env.setContext(ctx, WindowNo, "M_Locator_ID", ii.intValue()); } } diff --git a/org.adempiere.base.process/src/org/compiere/process/BOMValidate.java b/org.adempiere.base.process/src/org/compiere/process/BOMValidate.java index 4faa2514b0..4d692f813d 100644 --- a/org.adempiere.base.process/src/org/compiere/process/BOMValidate.java +++ b/org.adempiere.base.process/src/org/compiere/process/BOMValidate.java @@ -138,7 +138,7 @@ public class BOMValidate extends SvrProcess m_product = product; // Check Old Product BOM Structure - log.config(m_product.getName()); + if (log.isLoggable(Level.CONFIG)) log.config(m_product.getName()); m_products = new ArrayList(); if (!validateOldProduct (m_product)) { diff --git a/org.adempiere.base.process/src/org/compiere/process/BOMVerify.java b/org.adempiere.base.process/src/org/compiere/process/BOMVerify.java index 40d9ca266a..80a485f996 100644 --- a/org.adempiere.base.process/src/org/compiere/process/BOMVerify.java +++ b/org.adempiere.base.process/src/org/compiere/process/BOMVerify.java @@ -148,7 +148,7 @@ public class BOMVerify extends SvrProcess // Check Old Product BOM Structure - log.config(product.getName()); + if (log.isLoggable(Level.CONFIG)) log.config(product.getName()); foundproducts.add(product); diff --git a/org.adempiere.base.process/src/org/compiere/process/ChangeLogProcess.java b/org.adempiere.base.process/src/org/compiere/process/ChangeLogProcess.java index 4afa418c94..fe5443c3c0 100644 --- a/org.adempiere.base.process/src/org/compiere/process/ChangeLogProcess.java +++ b/org.adempiere.base.process/src/org/compiere/process/ChangeLogProcess.java @@ -392,7 +392,7 @@ public class ChangeLogProcess extends SvrProcess .append (" WHERE EntityType IN ('D','C'))"); int no = DB.executeUpdate(update.toString(), get_TrxName()); StringBuilder msglog = new StringBuilder().append(table.getTableName()).append(" = ").append(no); - log.config(msglog.toString()); + if (log.isLoggable(Level.CONFIG)) log.config(msglog.toString()); updateNo += no; } diff --git a/org.adempiere.base.process/src/org/compiere/process/ColumnEncryption.java b/org.adempiere.base.process/src/org/compiere/process/ColumnEncryption.java index d8e735e1e8..09ada9d345 100644 --- a/org.adempiere.base.process/src/org/compiere/process/ColumnEncryption.java +++ b/org.adempiere.base.process/src/org/compiere/process/ColumnEncryption.java @@ -184,7 +184,7 @@ public class ColumnEncryption extends SvrProcess { testClear.delete(p_MaxLength,testClear.length()); msglog = new StringBuilder() .append("Test=").append(testClear.toString()).append(" (").append(p_MaxLength).append(")"); - log.config(msglog.toString()); + if (log.isLoggable(Level.CONFIG)) log.config(msglog.toString()); // String encString = SecureEngine.encrypt(testClear.toString(), 0); int encLength = encString.length(); diff --git a/org.adempiere.base.process/src/org/compiere/process/CostUpdate.java b/org.adempiere.base.process/src/org/compiere/process/CostUpdate.java index 9cce4a99ee..3121158a63 100644 --- a/org.adempiere.base.process/src/org/compiere/process/CostUpdate.java +++ b/org.adempiere.base.process/src/org/compiere/process/CostUpdate.java @@ -130,7 +130,7 @@ public class CostUpdate extends SvrProcess m_ce = MCostElement.getMaterialCostElement(client, MAcctSchema.COSTINGMETHOD_StandardCosting); if (m_ce.get_ID() == 0) throw new AdempiereUserError ("@NotFound@ @M_CostElement_ID@ (StdCost)"); - log.config(m_ce.toString()); + if (log.isLoggable(Level.CONFIG)) log.config(m_ce.toString()); m_ass = MAcctSchema.getClientAcctSchema(getCtx(), client.getAD_Client_ID()); for (int i = 0; i < m_ass.length; i++) createNew(m_ass[i]); diff --git a/org.adempiere.base.process/src/org/compiere/process/ImportAccount.java b/org.adempiere.base.process/src/org/compiere/process/ImportAccount.java index 7f64897822..19a7215010 100644 --- a/org.adempiere.base.process/src/org/compiere/process/ImportAccount.java +++ b/org.adempiere.base.process/src/org/compiere/process/ImportAccount.java @@ -146,7 +146,7 @@ public class ImportAccount extends SvrProcess .append("WHERE C_Element_ID IS NULL") .append(" AND I_IsImported<>'Y'").append(clientCheck); no = DB.executeUpdate(sql.toString(), get_TrxName()); - log.config("Invalid Element=" + no); + if (log.isLoggable(Level.CONFIG)) log.config("Invalid Element=" + no); // No Name, Value sql = new StringBuilder ("UPDATE I_ElementValue ") @@ -154,7 +154,7 @@ public class ImportAccount extends SvrProcess .append("WHERE (Value IS NULL OR Name IS NULL)") .append(" AND I_IsImported<>'Y'").append(clientCheck); no = DB.executeUpdate(sql.toString(), get_TrxName()); - log.config("Invalid Name=" + no); + if (log.isLoggable(Level.CONFIG)) log.config("Invalid Name=" + no); // Set Column @@ -173,7 +173,7 @@ public class ImportAccount extends SvrProcess .append(" AND UPPER(Default_Account)<>'DEFAULT_ACCT'") // ignore default account .append(" AND I_IsImported<>'Y'").append(clientCheck); no = DB.executeUpdate(sql.toString(), get_TrxName()); - log.config("Invalid Column=" + no); + if (log.isLoggable(Level.CONFIG)) log.config("Invalid Column=" + no); // Set Post* Defaults (ignore errors) String[] yColumns = new String[] {"PostActual", "PostBudget", "PostStatistical", "PostEncumbrance"}; @@ -217,7 +217,7 @@ public class ImportAccount extends SvrProcess .append("WHERE AccountType NOT IN ('A','E','L','M','O','R')") .append(" AND I_IsImported<>'Y'").append(clientCheck); no = DB.executeUpdate(sql.toString(), get_TrxName()); - log.config("Invalid AccountType=" + no); + if (log.isLoggable(Level.CONFIG)) log.config("Invalid AccountType=" + no); // Check Account Sign (N) C B sql = new StringBuilder ("UPDATE I_ElementValue ") @@ -232,7 +232,7 @@ public class ImportAccount extends SvrProcess .append("WHERE AccountSign NOT IN ('N','C','D')") .append(" AND I_IsImported<>'Y'").append(clientCheck); no = DB.executeUpdate(sql.toString(), get_TrxName()); - log.config("Invalid AccountSign=" + no); + if (log.isLoggable(Level.CONFIG)) log.config("Invalid AccountSign=" + no); // No Value sql = new StringBuilder ("UPDATE I_ElementValue ") @@ -240,7 +240,7 @@ public class ImportAccount extends SvrProcess .append("WHERE (Value IS NULL OR Value='')") .append(" AND I_IsImported<>'Y'").append(clientCheck); no = DB.executeUpdate(sql.toString(), get_TrxName()); - log.config("Invalid Key=" + no); + if (log.isLoggable(Level.CONFIG)) log.config("Invalid Key=" + no); // **** Update ElementValue from existing sql = new StringBuilder ("UPDATE I_ElementValue i ") @@ -356,7 +356,7 @@ public class ImportAccount extends SvrProcess .append("WHERE ParentElementValue_ID IS NULL AND ParentValue IS NOT NULL") .append(" AND I_IsImported='Y' AND Processed='N'").append(clientCheck); no = DB.executeUpdate(sql.toString(), get_TrxName()); - log.config("Not Found Parent ElementValue=" + no); + if (log.isLoggable(Level.CONFIG)) log.config("Not Found Parent ElementValue=" + no); // sql = new StringBuilder ("SELECT i.ParentElementValue_ID, i.I_ElementValue_ID,") .append(" e.AD_Tree_ID, i.C_ElementValue_ID, i.Value||'-'||i.Name AS Info ") @@ -449,7 +449,7 @@ public class ImportAccount extends SvrProcess */ private void updateDefaults (String clientCheck) { - log.config("CreateNewCombination=" + m_createNewCombination); + if (log.isLoggable(Level.CONFIG)) log.config("CreateNewCombination=" + m_createNewCombination); // **** Update Defaults StringBuilder sql = new StringBuilder ("SELECT C_AcctSchema_ID FROM C_AcctSchema_Element ") @@ -496,7 +496,7 @@ public class ImportAccount extends SvrProcess */ private void updateDefaultAccounts (int C_AcctSchema_ID) { - log.config("C_AcctSchema_ID=" + C_AcctSchema_ID); + if (log.isLoggable(Level.CONFIG)) log.config("C_AcctSchema_ID=" + C_AcctSchema_ID); MAcctSchema as = new MAcctSchema (getCtx(), C_AcctSchema_ID, get_TrxName()); if (as.getAcctSchemaElement("AC").getC_Element_ID() != m_C_Element_ID) diff --git a/org.adempiere.base.process/src/org/compiere/process/ImportBPartner.java b/org.adempiere.base.process/src/org/compiere/process/ImportBPartner.java index e3234ad12d..699ccdc06f 100644 --- a/org.adempiere.base.process/src/org/compiere/process/ImportBPartner.java +++ b/org.adempiere.base.process/src/org/compiere/process/ImportBPartner.java @@ -145,7 +145,7 @@ implements ImportProcess .append("WHERE C_BP_Group_ID IS NULL") .append(" AND I_IsImported<>'Y'").append(clientCheck); no = DB.executeUpdateEx(sql.toString(), get_TrxName()); - log.config("Invalid Group=" + no); + if (log.isLoggable(Level.CONFIG)) log.config("Invalid Group=" + no); // Set Country /** @@ -171,7 +171,7 @@ implements ImportProcess .append("WHERE C_Country_ID IS NULL AND (City IS NOT NULL OR Address1 IS NOT NULL)") .append(" AND I_IsImported<>'Y'").append(clientCheck); no = DB.executeUpdateEx(sql.toString(), get_TrxName()); - log.config("Invalid Country=" + no); + if (log.isLoggable(Level.CONFIG)) log.config("Invalid Country=" + no); // Set Region sql = new StringBuilder ("UPDATE I_BPartner i ") @@ -199,7 +199,7 @@ implements ImportProcess .append(" WHERE c.C_Country_ID=i.C_Country_ID AND c.HasRegion='Y')") .append(" AND I_IsImported<>'Y'").append(clientCheck); no = DB.executeUpdateEx(sql.toString(), get_TrxName()); - log.config("Invalid Region=" + no); + if (log.isLoggable(Level.CONFIG)) log.config("Invalid Region=" + no); // Set Greeting sql = new StringBuilder ("UPDATE I_BPartner i ") @@ -215,7 +215,7 @@ implements ImportProcess .append("WHERE C_Greeting_ID IS NULL AND BPContactGreeting IS NOT NULL") .append(" AND I_IsImported<>'Y'").append(clientCheck); no = DB.executeUpdateEx(sql.toString(), get_TrxName()); - log.config("Invalid Greeting=" + no); + if (log.isLoggable(Level.CONFIG)) log.config("Invalid Greeting=" + no); // Existing User ? sql = new StringBuilder ("UPDATE I_BPartner i ") @@ -276,7 +276,7 @@ implements ImportProcess .append("WHERE Value IS NULL ") .append(" AND I_IsImported<>'Y'").append(clientCheck); no = DB.executeUpdateEx(sql.toString(), get_TrxName()); - log.config("Value is mandatory=" + no); + if (log.isLoggable(Level.CONFIG)) log.config("Value is mandatory=" + no); ModelValidationEngine.get().fireImportValidate(this, null, null, ImportValidator.TIMING_AFTER_VALIDATE); diff --git a/org.adempiere.base.process/src/org/compiere/process/ImportReportLine.java b/org.adempiere.base.process/src/org/compiere/process/ImportReportLine.java index 8f6ec98939..4a77ccd7ed 100644 --- a/org.adempiere.base.process/src/org/compiere/process/ImportReportLine.java +++ b/org.adempiere.base.process/src/org/compiere/process/ImportReportLine.java @@ -131,7 +131,7 @@ public class ImportReportLine extends SvrProcess .append("WHERE PA_ReportLineSet_ID IS NULL") .append(" AND I_IsImported<>'Y'").append(clientCheck); no = DB.executeUpdate(sql.toString(), get_TrxName()); - log.config("Invalid ReportLineSet=" + no); + if (log.isLoggable(Level.CONFIG)) log.config("Invalid ReportLineSet=" + no); // Ignore if there is no Report Line Name or ID sql = new StringBuilder ("UPDATE I_ReportLine ") @@ -139,7 +139,7 @@ public class ImportReportLine extends SvrProcess .append("WHERE PA_ReportLine_ID IS NULL AND Name IS NULL") .append(" AND I_IsImported<>'Y'").append(clientCheck); no = DB.executeUpdate(sql.toString(), get_TrxName()); - log.config("Invalid LineName=" + no); + if (log.isLoggable(Level.CONFIG)) log.config("Invalid LineName=" + no); // Validate ElementValue sql = new StringBuilder ("UPDATE I_ReportLine i ") @@ -156,7 +156,7 @@ public class ImportReportLine extends SvrProcess .append("WHERE C_ElementValue_ID IS NULL AND LineType<>'C'") // MReportLine.LINETYPE_Calculation .append(" AND I_IsImported<>'Y'").append(clientCheck); no = DB.executeUpdate(sql.toString(), get_TrxName()); - log.config("Invalid AccountType=" + no); + if (log.isLoggable(Level.CONFIG)) log.config("Invalid AccountType=" + no); // Set SeqNo sql = new StringBuilder ("UPDATE I_ReportLine ") @@ -211,7 +211,7 @@ public class ImportReportLine extends SvrProcess .append("WHERE CalculationType IS NOT NULL AND CalculationType NOT IN ('A','P','R','S')") .append(" AND I_IsImported<>'Y'").append(clientCheck); no = DB.executeUpdate(sql.toString(), get_TrxName()); - log.config("Invalid CalculationType=" + no); + if (log.isLoggable(Level.CONFIG)) log.config("Invalid CalculationType=" + no); // Convert Optional Amount Type to PAAmount Type and PAPeriodType sql = new StringBuilder ("UPDATE I_ReportLine ") @@ -219,7 +219,7 @@ public class ImportReportLine extends SvrProcess .append("WHERE AmountType IS NOT NULL AND (PAAmountType IS NULL OR PAPeriodType IS NULL) ") .append(" AND I_IsImported<>'Y'").append(clientCheck); no = DB.executeUpdate(sql.toString(), get_TrxName()); - log.config("Converted AmountType=" + no); + if (log.isLoggable(Level.CONFIG)) log.config("Converted AmountType=" + no); // Validate Optional Amount Type - sql = new StringBuilder ("UPDATE I_ReportLine ") @@ -227,7 +227,7 @@ public class ImportReportLine extends SvrProcess .append("WHERE PAAmountType IS NOT NULL AND UPPER(AmountType) NOT IN ('B','C','D','Q','S','R')") .append(" AND I_IsImported<>'Y'").append(clientCheck); no = DB.executeUpdate(sql.toString(), get_TrxName()); - log.config("Invalid AmountType=" + no); + if (log.isLoggable(Level.CONFIG)) log.config("Invalid AmountType=" + no); // Validate Optional Period Type - sql = new StringBuilder ("UPDATE I_ReportLine ") @@ -235,7 +235,7 @@ public class ImportReportLine extends SvrProcess .append("WHERE PAPeriodType IS NOT NULL AND UPPER(AmountType) NOT IN ('P','Y','T','N')") .append(" AND I_IsImported<>'Y'").append(clientCheck); no = DB.executeUpdate(sql.toString(), get_TrxName()); - log.config("Invalid PeriodType=" + no); + if (log.isLoggable(Level.CONFIG)) log.config("Invalid PeriodType=" + no); // Validate Optional Posting Type - A B E S R sql = new StringBuilder ("UPDATE I_ReportLine ") @@ -243,7 +243,7 @@ public class ImportReportLine extends SvrProcess .append("WHERE PostingType IS NOT NULL AND PostingType NOT IN ('A','B','E','S','R')") .append(" AND I_IsImported<>'Y'").append(clientCheck); no = DB.executeUpdate(sql.toString(), get_TrxName()); - log.config("Invalid PostingType=" + no); + if (log.isLoggable(Level.CONFIG)) log.config("Invalid PostingType=" + no); // Set PA_ReportLine_ID sql = new StringBuilder ("UPDATE I_ReportLine i ") @@ -349,7 +349,7 @@ public class ImportReportLine extends SvrProcess .append(" WHERE i.Name=iii.Name AND i.PA_ReportLineSet_ID=iii.PA_ReportLineSet_ID AND i.I_IsImported='N'))") .append(clientCheck); noUpdateLine = DB.executeUpdate(sql.toString(), get_TrxName()); - log.config("Update PA_ReportLine=" + noUpdateLine); + if (log.isLoggable(Level.CONFIG)) log.config("Update PA_ReportLine=" + noUpdateLine); // ------------------------------------------------------------------- diff --git a/org.adempiere.base.process/src/org/compiere/process/InvoiceNGL.java b/org.adempiere.base.process/src/org/compiere/process/InvoiceNGL.java index 964f24ee36..794d54c0e0 100644 --- a/org.adempiere.base.process/src/org/compiere/process/InvoiceNGL.java +++ b/org.adempiere.base.process/src/org/compiere/process/InvoiceNGL.java @@ -174,7 +174,7 @@ public class InvoiceNGL extends SvrProcess .append("WHERE AD_PInstance_ID=").append(getAD_PInstance_ID()); int noT = DB.executeUpdate(sql.toString(), get_TrxName()); if (noT > 0) - log.config("Difference #" + noT); + if (log.isLoggable(Level.CONFIG)) log.config("Difference #" + noT); // Percentage sql = new StringBuilder("UPDATE T_InvoiceGL SET Percent = 100 ") @@ -196,7 +196,7 @@ public class InvoiceNGL extends SvrProcess .append("WHERE Percent <> 100 AND AD_PInstance_ID=").append(getAD_PInstance_ID()); no = DB.executeUpdate(sql.toString(), get_TrxName()); if (no > 0) - log.config("Partial Calc #" + no); + if (log.isLoggable(Level.CONFIG)) log.config("Partial Calc #" + no); // Create Document String info = ""; diff --git a/org.adempiere.base.process/src/org/compiere/process/RfQCreatePO.java b/org.adempiere.base.process/src/org/compiere/process/RfQCreatePO.java index 60bf10829f..ea6fdd193f 100644 --- a/org.adempiere.base.process/src/org/compiere/process/RfQCreatePO.java +++ b/org.adempiere.base.process/src/org/compiere/process/RfQCreatePO.java @@ -82,7 +82,7 @@ public class RfQCreatePO extends SvrProcess // Complete MRfQResponse[] responses = rfq.getResponses(true, true); - log.config("#Responses=" + responses.length); + if (log.isLoggable(Level.CONFIG)) log.config("#Responses=" + responses.length); if (responses.length == 0) throw new IllegalArgumentException("No completed RfQ Responses found"); @@ -94,7 +94,7 @@ public class RfQCreatePO extends SvrProcess continue; // MBPartner bp = new MBPartner(getCtx(), response.getC_BPartner_ID(), get_TrxName()); - log.config("Winner=" + bp); + if (log.isLoggable(Level.CONFIG)) log.config("Winner=" + bp); MOrder order = new MOrder (getCtx(), 0, get_TrxName()); order.setIsSOTrx(false); if (p_C_DocType_ID != 0) @@ -163,7 +163,7 @@ public class RfQCreatePO extends SvrProcess bp = new MBPartner(getCtx(), response.getC_BPartner_ID(), get_TrxName()); order = null; } - log.config("Line=" + line + ", Winner=" + bp); + if (log.isLoggable(Level.CONFIG)) log.config("Line=" + line + ", Winner=" + bp); // New Order if (order == null) { diff --git a/org.adempiere.base.process/src/org/compiere/process/TableCreateColumns.java b/org.adempiere.base.process/src/org/compiere/process/TableCreateColumns.java index f0d73e9a48..7a22cd2705 100644 --- a/org.adempiere.base.process/src/org/compiere/process/TableCreateColumns.java +++ b/org.adempiere.base.process/src/org/compiere/process/TableCreateColumns.java @@ -233,7 +233,7 @@ public class TableCreateColumns extends SvrProcess int size = rs.getInt ("COLUMN_SIZE"); int digits = rs.getInt ("DECIMAL_DIGITS"); // - log.config (columnName + " - DataType=" + dataType + " " + typeName + if (log.isLoggable(Level.CONFIG)) log.config (columnName + " - DataType=" + dataType + " " + typeName + ", Nullable=" + nullable + ", Size=" + size + ", Digits=" + digits); // diff --git a/org.adempiere.base.process/src/org/compiere/process/TaxDeclarationCreate.java b/org.adempiere.base.process/src/org/compiere/process/TaxDeclarationCreate.java index 0ade87fced..cba02bf852 100644 --- a/org.adempiere.base.process/src/org/compiere/process/TaxDeclarationCreate.java +++ b/org.adempiere.base.process/src/org/compiere/process/TaxDeclarationCreate.java @@ -87,11 +87,11 @@ public class TaxDeclarationCreate extends SvrProcess String sql = "DELETE C_TaxDeclarationLine WHERE C_TaxDeclaration_ID=?"; int no = DB.executeUpdate(sql, p_C_TaxDeclaration_ID, false, get_TrxName()); if (no != 0) - log.config("Delete Line #" + no); + if (log.isLoggable(Level.CONFIG)) log.config("Delete Line #" + no); sql = "DELETE C_TaxDeclarationAcct WHERE C_TaxDeclaration_ID=?"; no = DB.executeUpdate(sql, p_C_TaxDeclaration_ID, false, get_TrxName()); if (no != 0) - log.config("Delete Acct #" + no); + if (log.isLoggable(Level.CONFIG)) log.config("Delete Acct #" + no); } // Get Invoices diff --git a/org.adempiere.base.process/src/org/compiere/process/TransactionXRef.java b/org.adempiere.base.process/src/org/compiere/process/TransactionXRef.java index 77b5b5237a..83afc16e94 100644 --- a/org.adempiere.base.process/src/org/compiere/process/TransactionXRef.java +++ b/org.adempiere.base.process/src/org/compiere/process/TransactionXRef.java @@ -135,7 +135,7 @@ public class TransactionXRef extends SvrProcess // int no = DB.executeUpdate(sql.toString(), get_TrxName()); log.fine(sql.toString()); - log.config("#" + no); + if (log.isLoggable(Level.CONFIG)) log.config("#" + no); // Multi-Level diff --git a/org.adempiere.base.process/src/org/compiere/process/TranslationDocSync.java b/org.adempiere.base.process/src/org/compiere/process/TranslationDocSync.java index 9068f3f944..04b4eab8ec 100644 --- a/org.adempiere.base.process/src/org/compiere/process/TranslationDocSync.java +++ b/org.adempiere.base.process/src/org/compiere/process/TranslationDocSync.java @@ -116,7 +116,7 @@ public class TranslationDocSync extends SvrProcess String baseTable = table.getTableName(); baseTable = baseTable.substring(0, baseTable.length()-4); - log.config(baseTable + ": " + sql); + if (log.isLoggable(Level.CONFIG)) log.config(baseTable + ": " + sql); String columnNames = sql.toString(); sql = new StringBuilder(); diff --git a/org.adempiere.base/src/org/compiere/acct/Doc_AllocationHdr.java b/org.adempiere.base/src/org/compiere/acct/Doc_AllocationHdr.java index afa9a789c0..73473c796d 100644 --- a/org.adempiere.base/src/org/compiere/acct/Doc_AllocationHdr.java +++ b/org.adempiere.base/src/org/compiere/acct/Doc_AllocationHdr.java @@ -587,7 +587,7 @@ public class Doc_AllocationHdr extends Doc double percent = invoice.getGrandTotal().doubleValue() / allocationSource.doubleValue(); if (percent > 0.99 && percent < 1.01) percent = 1.0; - log.config("Multiplier=" + percent + " - GrandTotal=" + invoice.getGrandTotal() + if (log.isLoggable(Level.CONFIG)) log.config("Multiplier=" + percent + " - GrandTotal=" + invoice.getGrandTotal() + " - Allocation Source=" + allocationSource); // Get Invoice Postings @@ -595,7 +595,7 @@ public class Doc_AllocationHdr extends Doc MInvoice.Table_ID, invoice.getC_Invoice_ID(), getTrxName()); docInvoice.loadDocumentDetails(); allocationAccounted = docInvoice.createFactCash(as, fact, new BigDecimal(percent)); - log.config("Allocation Accounted=" + allocationAccounted); + if (log.isLoggable(Level.CONFIG)) log.config("Allocation Accounted=" + allocationAccounted); // Cash Based Commitment Release if (as.isCreatePOCommitment() && !invoice.isSOTrx()) diff --git a/org.adempiere.base/src/org/compiere/acct/Doc_Invoice.java b/org.adempiere.base/src/org/compiere/acct/Doc_Invoice.java index c79c86ecf0..f5e6084051 100644 --- a/org.adempiere.base/src/org/compiere/acct/Doc_Invoice.java +++ b/org.adempiere.base/src/org/compiere/acct/Doc_Invoice.java @@ -871,7 +871,7 @@ public class Doc_Invoice extends Doc // end AZ } - log.config("Created #" + lcas.length); + if (log.isLoggable(Level.CONFIG)) log.config("Created #" + lcas.length); return true; } // landedCosts diff --git a/org.adempiere.base/src/org/compiere/acct/Fact.java b/org.adempiere.base/src/org/compiere/acct/Fact.java index edc2c8d543..e314c4a6dc 100644 --- a/org.adempiere.base/src/org/compiere/acct/Fact.java +++ b/org.adempiere.base/src/org/compiere/acct/Fact.java @@ -20,6 +20,7 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; +import java.util.logging.Level; import org.compiere.model.MAccount; import org.compiere.model.MAcctSchema; @@ -55,7 +56,7 @@ public final class Fact // Fix [ 1884676 ] Fact not setting transaction m_trxName = document.getTrxName(); // - log.config(toString()); + if (log.isLoggable(Level.CONFIG)) log.config(toString()); } // Fact diff --git a/org.adempiere.base/src/org/compiere/db/CConnection.java b/org.adempiere.base/src/org/compiere/db/CConnection.java index cfed43be0b..197df7f7cd 100644 --- a/org.adempiere.base/src/org/compiere/db/CConnection.java +++ b/org.adempiere.base/src/org/compiere/db/CConnection.java @@ -868,7 +868,7 @@ public class CConnection implements Serializable, Cloneable if (isDataSource()) m_info[1] += " - via DataSource"; m_info[1] = m_info[1].replace ('\n', ' '); - log.config(m_info[0] + " - " + m_info[1]); + if (log.isLoggable(Level.CONFIG)) log.config(m_info[0] + " - " + m_info[1]); } /************************************************************************* @@ -1354,7 +1354,7 @@ public class CConnection implements Serializable, Cloneable if (getFwHost() == null || getFwHost().length () == 0) setViaFirewall (false); m_version = svr.getDateVersion (); - log.config("Server=" + getDbHost() + ", DB=" + getDbName()); + if (log.isLoggable(Level.CONFIG)) log.config("Server=" + getDbHost() + ", DB=" + getDbName()); } // update Info /** diff --git a/org.adempiere.base/src/org/compiere/db/CreateAdempiere.java b/org.adempiere.base/src/org/compiere/db/CreateAdempiere.java index 6426535e76..7cfd5e7e70 100644 --- a/org.adempiere.base/src/org/compiere/db/CreateAdempiere.java +++ b/org.adempiere.base/src/org/compiere/db/CreateAdempiere.java @@ -552,7 +552,7 @@ public class CreateAdempiere rs = null; pstmt = null; } long elapsed = System.currentTimeMillis() - start; - log.config("Inserted=" + count + " - Errors=" + errors + if (log.isLoggable(Level.CONFIG)) log.config("Inserted=" + count + " - Errors=" + errors + " - " + elapsed + " ms"); return success; } // createTableData diff --git a/org.adempiere.base/src/org/compiere/db/JDBCInfo.java b/org.adempiere.base/src/org/compiere/db/JDBCInfo.java index d567b92b07..431f5e5a24 100644 --- a/org.adempiere.base/src/org/compiere/db/JDBCInfo.java +++ b/org.adempiere.base/src/org/compiere/db/JDBCInfo.java @@ -45,12 +45,15 @@ public class JDBCInfo { m_md = conn.getMetaData(); log.info(m_md.getDatabaseProductName()); - log.config(m_md.getDatabaseProductVersion()); + if (log.isLoggable(Level.CONFIG)) log.config(m_md.getDatabaseProductVersion()); // log.config(m_md.getDatabaseMajorVersion() + "/" + m_md.getDatabaseMinorVersion()); // log.info(m_md.getDriverName()); - log.config(m_md.getDriverVersion()); - log.config(m_md.getDriverMajorVersion() + "/" + m_md.getDriverMinorVersion()); + if (log.isLoggable(Level.CONFIG)){ + log.config(m_md.getDriverVersion()); + log.config(m_md.getDriverMajorVersion() + "/" + m_md.getDriverMinorVersion()); + } + // // log.info("JDBC = " + m_md.getJDBCMajorVersion() + "/" + m_md.getJDBCMinorVersion()); } // JDBCInfo diff --git a/org.adempiere.base/src/org/compiere/impexp/ImpFormat.java b/org.adempiere.base/src/org/compiere/impexp/ImpFormat.java index 5ff0c397bd..cb75518183 100644 --- a/org.adempiere.base/src/org/compiere/impexp/ImpFormat.java +++ b/org.adempiere.base/src/org/compiere/impexp/ImpFormat.java @@ -361,7 +361,7 @@ public final class ImpFormat public String[] parseLine (String line, boolean withLabel, boolean trace, boolean ignoreEmpty) { if (trace) - log.config("" + line); + if (log.isLoggable(Level.CONFIG)) log.config("" + line); ArrayList list = new ArrayList(); // for all columns diff --git a/org.adempiere.base/src/org/compiere/interfaces/impl/ServerBean.java b/org.adempiere.base/src/org/compiere/interfaces/impl/ServerBean.java index 267ba12819..6c7933214a 100644 --- a/org.adempiere.base/src/org/compiere/interfaces/impl/ServerBean.java +++ b/org.adempiere.base/src/org/compiere/interfaces/impl/ServerBean.java @@ -17,6 +17,7 @@ package org.compiere.interfaces.impl; import java.util.Properties; +import java.util.logging.Level; import org.adempiere.util.ProcessUtil; import org.compiere.acct.Doc; @@ -116,7 +117,7 @@ public class ServerBean implements Server */ public int cacheReset (Properties ctx, String tableName, int Record_ID) { - log.config(tableName + " - " + Record_ID); + if (log.isLoggable(Level.CONFIG)) log.config(tableName + " - " + Record_ID); return CacheMgt.get().reset(tableName, Record_ID); } // cacheReset diff --git a/org.adempiere.base/src/org/compiere/model/AttachmentFileSystem.java b/org.adempiere.base/src/org/compiere/model/AttachmentFileSystem.java index 72fb98be88..d64800747c 100644 --- a/org.adempiere.base/src/org/compiere/model/AttachmentFileSystem.java +++ b/org.adempiere.base/src/org/compiere/model/AttachmentFileSystem.java @@ -280,7 +280,7 @@ public class AttachmentFileSystem implements IAttachmentStore { } } attach.m_items.remove(index); - log.config("Index=" + index + " - NewSize=" + attach.m_items.size()); + if (log.isLoggable(Level.CONFIG)) log.config("Index=" + index + " - NewSize=" + attach.m_items.size()); return true; } diff --git a/org.adempiere.base/src/org/compiere/model/GridField.java b/org.adempiere.base/src/org/compiere/model/GridField.java index b8e12fd4bf..79a64cfc9d 100644 --- a/org.adempiere.base/src/org/compiere/model/GridField.java +++ b/org.adempiere.base/src/org/compiere/model/GridField.java @@ -161,7 +161,7 @@ public class GridField { if (!isLookup()) return; - log.config("(" + m_vo.ColumnName + ")"); + if (log.isLoggable(Level.CONFIG)) log.config("(" + m_vo.ColumnName + ")"); if (DisplayType.isLookup(m_vo.displayType) && m_vo.IsDisplayed) { @@ -1259,7 +1259,7 @@ public class GridField else m_parentValue = Boolean.valueOf(m_vo.ColumnName.equals(LinkColumnName)); if (m_parentValue) - log.config(m_parentValue + if (log.isLoggable(Level.CONFIG)) log.config(m_parentValue + " - Link(" + LinkColumnName + ", W=" + m_vo.WindowNo + ",T=" + m_vo.TabNo + ") = " + m_vo.ColumnName); else @@ -1780,7 +1780,7 @@ public class GridField if (m_vo.ColumnName.equals(linkColumn)) { result = true; - log.config(result + if (log.isLoggable(Level.CONFIG)) log.config(result + " - Link(" + linkColumn + ", W=" + m_vo.WindowNo + ",T=" + m_vo.TabNo + ") = " + m_vo.ColumnName); } diff --git a/org.adempiere.base/src/org/compiere/model/GridTab.java b/org.adempiere.base/src/org/compiere/model/GridTab.java index 74f2cdc23d..98f7795f11 100644 --- a/org.adempiere.base/src/org/compiere/model/GridTab.java +++ b/org.adempiere.base/src/org/compiere/model/GridTab.java @@ -1564,7 +1564,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable if (parsed.length() == 0) return true; boolean retValue = Evaluator.evaluateLogic(this, dl); - log.config(m_vo.Name + " (" + dl + ") => " + retValue); + if (log.isLoggable(Level.CONFIG)) log.config(m_vo.Name + " (" + dl + ") => " + retValue); return retValue; } // isDisplayed diff --git a/org.adempiere.base/src/org/compiere/model/GridTable.java b/org.adempiere.base/src/org/compiere/model/GridTable.java index 0d8e17789e..a1cf349a82 100644 --- a/org.adempiere.base/src/org/compiere/model/GridTable.java +++ b/org.adempiere.base/src/org/compiere/model/GridTable.java @@ -1395,7 +1395,7 @@ public class GridTable extends AbstractTableModel // no need - not changed - row not positioned - no Value changed if (m_rowChanged == -1) { - log.config("NoNeed - Changed=" + m_changed + ", Row=" + m_rowChanged); + if (log.isLoggable(Level.CONFIG)) log.config("NoNeed - Changed=" + m_changed + ", Row=" + m_rowChanged); // return SAVE_ERROR; if (!manualCmd) return SAVE_OK; @@ -3444,7 +3444,7 @@ public class GridTable extends AbstractTableModel */ private void close() { - // log.config( "MTable Loader.close"); + //log.config( "MTable Loader.close"); DB.close(m_rs, m_pstmt); m_rs = null; m_pstmt = null; diff --git a/org.adempiere.base/src/org/compiere/model/GridWindow.java b/org.adempiere.base/src/org/compiere/model/GridWindow.java index 6e75187b52..790c2edab7 100644 --- a/org.adempiere.base/src/org/compiere/model/GridWindow.java +++ b/org.adempiere.base/src/org/compiere/model/GridWindow.java @@ -82,7 +82,7 @@ public class GridWindow implements Serializable */ public static GridWindow get (Properties ctx, int WindowNo, int AD_Window_ID, boolean virtual) { - log.config("Window=" + WindowNo + ", AD_Window_ID=" + AD_Window_ID); + if (log.isLoggable(Level.CONFIG)) log.config("Window=" + WindowNo + ", AD_Window_ID=" + AD_Window_ID); GridWindowVO mWindowVO = GridWindowVO.create (Env.getCtx(), WindowNo, AD_Window_ID); if (mWindowVO == null) return null; diff --git a/org.adempiere.base/src/org/compiere/model/MBankStatementLoader.java b/org.adempiere.base/src/org/compiere/model/MBankStatementLoader.java index bd865fba90..9e3b42881d 100644 --- a/org.adempiere.base/src/org/compiere/model/MBankStatementLoader.java +++ b/org.adempiere.base/src/org/compiere/model/MBankStatementLoader.java @@ -18,6 +18,7 @@ package org.compiere.model; import java.sql.ResultSet; import java.util.Properties; +import java.util.logging.Level; import org.compiere.impexp.BankStatementLoaderInterface; @@ -203,56 +204,56 @@ import org.compiere.impexp.BankStatementLoaderInterface; return result; } // Bank Account fields - log.config( "MBankStatementLoader.importLine Bank Account=" + m_loader.getBankAccountNo()); + if (log.isLoggable(Level.CONFIG))log.config( "MBankStatementLoader.importLine Bank Account=" + m_loader.getBankAccountNo()); imp.setBankAccountNo(m_loader.getBankAccountNo()); - log.config( "MBankStatementLoader.importLine Routing No=" + m_loader.getRoutingNo()); + if (log.isLoggable(Level.CONFIG))log.config( "MBankStatementLoader.importLine Routing No=" + m_loader.getRoutingNo()); imp.setRoutingNo(m_loader.getRoutingNo()); - // Statement fields - log.config( "MBankStatementLoader.importLine EFT Statement Reference No=" + m_loader.getStatementReference()); + // Statement fields + if (log.isLoggable(Level.CONFIG))log.config( "MBankStatementLoader.importLine EFT Statement Reference No=" + m_loader.getStatementReference()); imp.setEftStatementReference(m_loader.getStatementReference()); - log.config( "MBankStatementLoader.importLine EFT Statement Date=" + m_loader.getStatementDate()); + if (log.isLoggable(Level.CONFIG))log.config( "MBankStatementLoader.importLine EFT Statement Date=" + m_loader.getStatementDate()); imp.setEftStatementDate(m_loader.getStatementDate()); - log.config( "MBankStatementLoader.importLine Statement Date=" + m_loader.getStatementDate()); - imp.setStatementDate(m_loader.getStatementDate()); + if (log.isLoggable(Level.CONFIG))log.config( "MBankStatementLoader.importLine Statement Date=" + m_loader.getStatementDate()); + imp.setStatementDate(m_loader.getStatementDate()); // Statement Line fields - log.config( "MBankStatementLoader.importLine EFT Transaction ID=" + m_loader.getTrxID()); + if (log.isLoggable(Level.CONFIG))log.config( "MBankStatementLoader.importLine EFT Transaction ID=" + m_loader.getTrxID()); imp.setEftTrxID(m_loader.getTrxID()); - log.config( "MBankStatementLoader.importLine Statement Line Date=" + m_loader.getStatementLineDate()); + if (log.isLoggable(Level.CONFIG))log.config( "MBankStatementLoader.importLine Statement Line Date=" + m_loader.getStatementLineDate()); imp.setStatementLineDate(m_loader.getStatementLineDate()); imp.setStatementLineDate(m_loader.getStatementLineDate()); imp.setEftStatementLineDate(m_loader.getStatementLineDate()); - log.config( "MBankStatementLoader.importLine Valuta Date=" + m_loader.getValutaDate()); + if (log.isLoggable(Level.CONFIG))log.config( "MBankStatementLoader.importLine Valuta Date=" + m_loader.getValutaDate()); imp.setValutaDate(m_loader.getValutaDate()); imp.setEftValutaDate(m_loader.getValutaDate()); - log.config( "MBankStatementLoader.importLine Statement Amount=" + m_loader.getStmtAmt()); + if (log.isLoggable(Level.CONFIG))log.config( "MBankStatementLoader.importLine Statement Amount=" + m_loader.getStmtAmt()); imp.setStmtAmt(m_loader.getStmtAmt()); imp.setEftAmt(m_loader.getStmtAmt()); - log.config( "MBankStatementLoader.importLine Transaction Amount=" + m_loader.getTrxAmt()); + if (log.isLoggable(Level.CONFIG))log.config( "MBankStatementLoader.importLine Transaction Amount=" + m_loader.getTrxAmt()); imp.setTrxAmt(m_loader.getTrxAmt()); - log.config( "MBankStatementLoader.importLine Interest Amount=" + m_loader.getInterestAmt()); + if (log.isLoggable(Level.CONFIG))log.config( "MBankStatementLoader.importLine Interest Amount=" + m_loader.getInterestAmt()); imp.setInterestAmt(m_loader.getInterestAmt()); - log.config( "MBankStatementLoader.importLine Reference No=" + m_loader.getReference()); + if (log.isLoggable(Level.CONFIG))log.config( "MBankStatementLoader.importLine Reference No=" + m_loader.getReference()); imp.setReferenceNo(m_loader.getReference()); imp.setEftReference(m_loader.getReference()); - log.config( "MBankStatementLoader.importLine Check No=" + m_loader.getCheckNo()); + if (log.isLoggable(Level.CONFIG))log.config( "MBankStatementLoader.importLine Check No=" + m_loader.getCheckNo()); imp.setEftCheckNo(m_loader.getCheckNo()); - log.config( "MBankStatementLoader.importLine Memo=" + m_loader.getMemo()); + if (log.isLoggable(Level.CONFIG))log.config( "MBankStatementLoader.importLine Memo=" + m_loader.getMemo()); imp.setMemo(m_loader.getMemo()); imp.setEftMemo(m_loader.getMemo()); - log.config( "MBankStatementLoader.importLine Payee Name=" + m_loader.getPayeeName()); + if (log.isLoggable(Level.CONFIG))log.config( "MBankStatementLoader.importLine Payee Name=" + m_loader.getPayeeName()); imp.setEftPayee(m_loader.getPayeeName()); - log.config( "MBankStatementLoader.importLine Payee Account No=" + m_loader.getPayeeAccountNo()); + if (log.isLoggable(Level.CONFIG))log.config( "MBankStatementLoader.importLine Payee Account No=" + m_loader.getPayeeAccountNo()); imp.setEftPayeeAccount(m_loader.getPayeeAccountNo()); - log.config( "MBankStatementLoader.importLine EFT Transaction Type=" + m_loader.getTrxType()); + if (log.isLoggable(Level.CONFIG))log.config( "MBankStatementLoader.importLine EFT Transaction Type=" + m_loader.getTrxType()); imp.setEftTrxType(m_loader.getTrxType()); - log.config( "MBankStatementLoader.importLine Currency=" + m_loader.getCurrency()); + if (log.isLoggable(Level.CONFIG))log.config( "MBankStatementLoader.importLine Currency=" + m_loader.getCurrency()); imp.setEftCurrency(m_loader.getCurrency()); imp.setISO_Code(m_loader.getCurrency()); - log.config( "MBankStatementLoader.importLine Charge Name=" + m_loader.getChargeName()); + if (log.isLoggable(Level.CONFIG))log.config( "MBankStatementLoader.importLine Charge Name=" + m_loader.getChargeName()); imp.setChargeName(m_loader.getChargeName()); - log.config( "MBankStatementLoader.importLine Charge Amount=" + m_loader.getChargeAmt()); + if (log.isLoggable(Level.CONFIG))log.config( "MBankStatementLoader.importLine Charge Amount=" + m_loader.getChargeAmt()); imp.setChargeAmt(m_loader.getChargeAmt()); imp.setProcessed(false); imp.setI_IsImported(false); diff --git a/org.adempiere.base/src/org/compiere/model/MColor.java b/org.adempiere.base/src/org/compiere/model/MColor.java index d10da418e2..46cba1004c 100644 --- a/org.adempiere.base/src/org/compiere/model/MColor.java +++ b/org.adempiere.base/src/org/compiere/model/MColor.java @@ -20,6 +20,7 @@ import java.awt.Color; import java.sql.ResultSet; import java.sql.SQLException; import java.util.Properties; +import java.util.logging.Level; /** * Color Persistent Object Model @@ -68,7 +69,7 @@ public class MColor extends X_AD_Color */ protected Object loadSpecial (ResultSet rs, int index) throws SQLException { - log.config(p_info.getColumnName(index)); + if (log.isLoggable(Level.CONFIG)) log.config(p_info.getColumnName(index)); if (index == get_ColumnIndex("ColorType")) return rs.getString(index+1); return null; diff --git a/org.adempiere.base/src/org/compiere/model/MGoal.java b/org.adempiere.base/src/org/compiere/model/MGoal.java index db6abad1b0..061a02bb4a 100644 --- a/org.adempiere.base/src/org/compiere/model/MGoal.java +++ b/org.adempiere.base/src/org/compiere/model/MGoal.java @@ -369,7 +369,7 @@ public class MGoal extends X_PA_Goal */ public boolean updateGoal(boolean force) { - log.config("Force=" + force); + if (log.isLoggable(Level.CONFIG)) log.config("Force=" + force); MMeasure measure = MMeasure.get(getCtx(), getPA_Measure_ID()); if (force || getDateLastRun() == null diff --git a/org.adempiere.base/src/org/compiere/model/MImage.java b/org.adempiere.base/src/org/compiere/model/MImage.java index ae72577fb7..4873fdc4f0 100644 --- a/org.adempiere.base/src/org/compiere/model/MImage.java +++ b/org.adempiere.base/src/org/compiere/model/MImage.java @@ -284,7 +284,7 @@ public class MImage extends X_AD_Image } catch (Exception e) { - log.config (e.toString()); + if (log.isLoggable(Level.CONFIG)) log.config (e.toString()); } return data; } // getData diff --git a/org.adempiere.base/src/org/compiere/model/MInOut.java b/org.adempiere.base/src/org/compiere/model/MInOut.java index f9ed9a7a85..6f176f00ef 100644 --- a/org.adempiere.base/src/org/compiere/model/MInOut.java +++ b/org.adempiere.base/src/org/compiere/model/MInOut.java @@ -1814,7 +1814,7 @@ public class MInOut extends X_M_InOut implements DocAction { int no = MInOutLineMA.deleteInOutLineMA(line.getM_InOutLine_ID(), get_TrxName()); if (no > 0) - log.config("Delete old #" + no); + if (log.isLoggable(Level.CONFIG)) log.config("Delete old #" + no); // Incoming Trx String MovementType = getMovementType(); @@ -1861,7 +1861,7 @@ public class MInOut extends X_M_InOut implements DocAction asi = MAttributeSetInstance.create(getCtx(), product, get_TrxName()); } line.setM_AttributeSetInstance_ID(asi.getM_AttributeSetInstance_ID()); - log.config("New ASI=" + line); + if (log.isLoggable(Level.CONFIG)) log.config("New ASI=" + line); needSave = true; } // Create consume the Attribute Set Instance using policy FIFO/LIFO diff --git a/org.adempiere.base/src/org/compiere/model/MInventory.java b/org.adempiere.base/src/org/compiere/model/MInventory.java index ac72eecfcd..49cab66966 100644 --- a/org.adempiere.base/src/org/compiere/model/MInventory.java +++ b/org.adempiere.base/src/org/compiere/model/MInventory.java @@ -22,6 +22,7 @@ import java.sql.ResultSet; import java.sql.Timestamp; import java.util.List; import java.util.Properties; +import java.util.logging.Level; import org.compiere.process.DocAction; import org.compiere.process.DocumentEngine; @@ -575,7 +576,7 @@ public class MInventory extends X_M_Inventory implements DocAction { int no = MInventoryLineMA.deleteInventoryLineMA(line.getM_InventoryLine_ID(), get_TrxName()); if (no > 0) - log.config("Delete old #" + no); + if (log.isLoggable(Level.CONFIG)) log.config("Delete old #" + no); // Check Line boolean needSave = false; diff --git a/org.adempiere.base/src/org/compiere/model/MInvoiceLine.java b/org.adempiere.base/src/org/compiere/model/MInvoiceLine.java index 271bd4a0ba..cd217292a8 100644 --- a/org.adempiere.base/src/org/compiere/model/MInvoiceLine.java +++ b/org.adempiere.base/src/org/compiere/model/MInvoiceLine.java @@ -1212,7 +1212,7 @@ public class MInvoiceLine extends X_C_InvoiceLine { largestAmtAllocation.setAmt(largestAmtAllocation.getAmt().add(difference)); largestAmtAllocation.saveEx(); - log.config("Difference=" + difference + if (log.isLoggable(Level.CONFIG)) log.config("Difference=" + difference + ", C_LandedCostAllocation_ID=" + largestAmtAllocation.getC_LandedCostAllocation_ID() + ", Amt" + largestAmtAllocation.getAmt()); } diff --git a/org.adempiere.base/src/org/compiere/model/MLdapProcessor.java b/org.adempiere.base/src/org/compiere/model/MLdapProcessor.java index 8e1ccf1d15..6d7ae97c48 100755 --- a/org.adempiere.base/src/org/compiere/model/MLdapProcessor.java +++ b/org.adempiere.base/src/org/compiere/model/MLdapProcessor.java @@ -262,7 +262,7 @@ public class MLdapProcessor extends X_AD_LdapProcessor implements AdempiereProce error = new StringBuilder("@NotFound@ O=").append(o); ldapUser.setErrorString(error.toString()); m_error++; - log.config (error.toString()); + if (log.isLoggable(Level.CONFIG)) log.config (error.toString()); return ldapUser; } // Optional Interest Area @@ -275,7 +275,7 @@ public class MLdapProcessor extends X_AD_LdapProcessor implements AdempiereProce error = new StringBuilder("@NotFound@ OU=").append(ou); ldapUser.setErrorString(error.toString()); m_error++; - log.config (error.toString()); + if (log.isLoggable(Level.CONFIG)) log.config (error.toString()); return ldapUser; } } diff --git a/org.adempiere.base/src/org/compiere/model/MMatchPO.java b/org.adempiere.base/src/org/compiere/model/MMatchPO.java index 84728fb44a..09b719b58c 100644 --- a/org.adempiere.base/src/org/compiere/model/MMatchPO.java +++ b/org.adempiere.base/src/org/compiere/model/MMatchPO.java @@ -825,7 +825,7 @@ public class MMatchPO extends X_M_MatchPO .divide(Env.ONEHUNDRED, 2, BigDecimal.ROUND_HALF_UP); difference = difference.abs(); boolean ok = difference.compareTo(maxTolerance) <= 0; - log.config("Difference=" + getPriceMatchDifference() + if (log.isLoggable(Level.CONFIG)) log.config("Difference=" + getPriceMatchDifference() + ", Max=" + maxTolerance + " => " + ok); setIsApproved(ok); } diff --git a/org.adempiere.base/src/org/compiere/model/MMovement.java b/org.adempiere.base/src/org/compiere/model/MMovement.java index 5cd5153675..42cf23b83a 100644 --- a/org.adempiere.base/src/org/compiere/model/MMovement.java +++ b/org.adempiere.base/src/org/compiere/model/MMovement.java @@ -22,6 +22,7 @@ import java.sql.ResultSet; import java.sql.Timestamp; import java.util.List; import java.util.Properties; +import java.util.logging.Level; import org.compiere.process.DocAction; import org.compiere.process.DocumentEngine; @@ -546,7 +547,7 @@ public class MMovement extends X_M_Movement implements DocAction { int no = MMovementLineMA.deleteMovementLineMA(line.getM_MovementLine_ID(), get_TrxName()); if (no > 0) - log.config("Delete old #" + no); + if (log.isLoggable(Level.CONFIG)) log.config("Delete old #" + no); boolean needSave = false; diff --git a/org.adempiere.base/src/org/compiere/model/MRequest.java b/org.adempiere.base/src/org/compiere/model/MRequest.java index f1cd2ecc60..34aff40b7f 100644 --- a/org.adempiere.base/src/org/compiere/model/MRequest.java +++ b/org.adempiere.base/src/org/compiere/model/MRequest.java @@ -24,6 +24,7 @@ import java.sql.Timestamp; import java.util.ArrayList; import java.util.List; import java.util.Properties; +import java.util.logging.Level; import org.adempiere.exceptions.DBException; import org.compiere.util.CLogger; @@ -1162,7 +1163,7 @@ public class MRequest extends X_R_Request if (X_AD_User.NOTIFICATIONTYPE_None.equals(NotificationType)) { - log.config("Opt out: " + Name); + if (log.isLoggable(Level.CONFIG)) log.config("Opt out: " + Name); continue; } if ((X_AD_User.NOTIFICATIONTYPE_EMail.equals(NotificationType) @@ -1173,14 +1174,14 @@ public class MRequest extends X_R_Request NotificationType = X_AD_User.NOTIFICATIONTYPE_Notice; else { - log.config("No EMail: " + Name); + if (log.isLoggable(Level.CONFIG)) log.config("No EMail: " + Name); continue; } } if (X_AD_User.NOTIFICATIONTYPE_Notice.equals(NotificationType) && AD_Role_ID >= 0) { - log.config("No internal User: " + Name); + if (log.isLoggable(Level.CONFIG)) log.config("No internal User: " + Name); continue; } diff --git a/org.adempiere.base/src/org/compiere/model/NaturalAccountMap.java b/org.adempiere.base/src/org/compiere/model/NaturalAccountMap.java index 6121fead12..cec54a7104 100644 --- a/org.adempiere.base/src/org/compiere/model/NaturalAccountMap.java +++ b/org.adempiere.base/src/org/compiere/model/NaturalAccountMap.java @@ -90,7 +90,7 @@ public final class NaturalAccountMap extends CCache */ public String parseFile (File file) { - log.config(file.getAbsolutePath()); + if (log.isLoggable(Level.CONFIG)) log.config(file.getAbsolutePath()); String line = null; try { @@ -142,7 +142,7 @@ public final class NaturalAccountMap extends CCache @SuppressWarnings("unchecked") public String parseLine (String line, int lineNo) throws Exception { - log.config(lineNo+" : "+line); + if (log.isLoggable(Level.CONFIG)) log.config(lineNo+" : "+line); if (line.trim().length()==0) { log.log(Level.WARNING, "Line "+lineNo+" is empty, ignored. "); diff --git a/org.adempiere.base/src/org/compiere/model/PO_Record.java b/org.adempiere.base/src/org/compiere/model/PO_Record.java index 3076fb918f..6dfc1ddcc3 100644 --- a/org.adempiere.base/src/org/compiere/model/PO_Record.java +++ b/org.adempiere.base/src/org/compiere/model/PO_Record.java @@ -110,7 +110,7 @@ public class PO_Record .append(" WHERE AD_Table_ID=? AND Record_ID=?"); int no = DB.executeUpdate(sql.toString(), params, false, trxName); if (no > 0) - log.config(s_cascadeNames[i] + " (" + AD_Table_ID + "/" + Record_ID + ") #" + no); + if (log.isLoggable(Level.CONFIG)) log.config(s_cascadeNames[i] + " (" + AD_Table_ID + "/" + Record_ID + ") #" + no); else if (no < 0) { log.severe(s_cascadeNames[i] + " (" + AD_Table_ID + "/" + Record_ID + ") #" + no); @@ -137,7 +137,7 @@ public class PO_Record .append(s_parentNames[j]).append("_ID=?)"); int no = DB.executeUpdate(sql.toString(), params, false, trxName); if (no > 0) - log.config(s_cascadeNames[i] + " " + s_parentNames[j] + if (log.isLoggable(Level.CONFIG)) log.config(s_cascadeNames[i] + " " + s_parentNames[j] + " (" + AD_Table_ID + "/" + Record_ID + ") #" + no); else if (no < 0) { @@ -230,7 +230,7 @@ public class PO_Record .append(TableName).append("_ID FROM ").append(TableName).append(")"); int no = DB.executeUpdate(sql.toString(), null); if (no > 0) - log.config(s_cascadeNames[i] + " (" + AD_Table_ID + "/" + TableName + if (log.isLoggable(Level.CONFIG)) log.config(s_cascadeNames[i] + " (" + AD_Table_ID + "/" + TableName + ") Invalid #" + no); } } // validate diff --git a/org.adempiere.base/src/org/compiere/model/ScheduleUtil.java b/org.adempiere.base/src/org/compiere/model/ScheduleUtil.java index df4a176743..8ade24ad7b 100644 --- a/org.adempiere.base/src/org/compiere/model/ScheduleUtil.java +++ b/org.adempiere.base/src/org/compiere/model/ScheduleUtil.java @@ -102,7 +102,7 @@ public class ScheduleUtil Timestamp start_Date, Timestamp end_Date, BigDecimal qty, boolean getAll, String trxName) { - log.config(start_Date.toString()); + if (log.isLoggable(Level.CONFIG)) log.config(start_Date.toString()); if (m_S_Resource_ID != S_Resource_ID) getBaseInfo (S_Resource_ID); // @@ -804,7 +804,7 @@ public class ScheduleUtil @SuppressWarnings("unused") MUOM uom = MUOM.get (m_ctx, m_C_UOM_ID); int minutes = MUOMConversion.convertToMinutes (m_ctx, m_C_UOM_ID, Env.ONE); - log.config("Minutes=" + minutes); + if (log.isLoggable(Level.CONFIG)) log.config("Minutes=" + minutes); // if (minutes > 0 && minutes < 60*24) { diff --git a/org.adempiere.base/src/org/compiere/model/Scriptlet.java b/org.adempiere.base/src/org/compiere/model/Scriptlet.java index fe8c192161..9b93eafa29 100644 --- a/org.adempiere.base/src/org/compiere/model/Scriptlet.java +++ b/org.adempiere.base/src/org/compiere/model/Scriptlet.java @@ -147,7 +147,7 @@ public class Scriptlet try { m_result = i.get (m_variable); - log.config("Result (" + m_result.getClass().getName() + ") " + m_result); + if (log.isLoggable(Level.CONFIG)) log.config("Result (" + m_result.getClass().getName() + ") " + m_result); } catch (Exception e) { diff --git a/org.adempiere.base/src/org/compiere/model/Tax.java b/org.adempiere.base/src/org/compiere/model/Tax.java index 1eb6e7cb5a..3b2c1e034f 100644 --- a/org.adempiere.base/src/org/compiere/model/Tax.java +++ b/org.adempiere.base/src/org/compiere/model/Tax.java @@ -21,6 +21,7 @@ import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Timestamp; import java.util.Properties; +import java.util.logging.Level; import org.adempiere.exceptions.DBException; import org.adempiere.exceptions.TaxCriteriaNotFoundException; @@ -482,7 +483,7 @@ public class Tax { log.info("get(Detail) - Category=" + C_TaxCategory_ID + ", SOTrx=" + IsSOTrx); - log.config("get(Detail) - BillFrom=" + billFromC_Location_ID + if (log.isLoggable(Level.CONFIG)) log.config("get(Detail) - BillFrom=" + billFromC_Location_ID + ", BillTo=" + billToC_Location_ID + ", BillDate=" + billDate); } diff --git a/org.adempiere.base/src/org/compiere/print/PrintData.java b/org.adempiere.base/src/org/compiere/print/PrintData.java index b57ee3d98c..fe575bfef7 100644 --- a/org.adempiere.base/src/org/compiere/print/PrintData.java +++ b/org.adempiere.base/src/org/compiere/print/PrintData.java @@ -575,7 +575,7 @@ public class PrintData implements Serializable if (pd.getColumnInfo() != null) { for (int i = 0; i < pd.getColumnInfo().length; i++) - log.config(i + ": " + pd.getColumnInfo()[i]); + if (log.isLoggable(Level.CONFIG)) log.config(i + ": " + pd.getColumnInfo()[i]); } } // dump @@ -610,10 +610,10 @@ public class PrintData implements Serializable } else if (obj instanceof PrintDataElement) { - log.config(((PrintDataElement)obj).toStringX()); + if (log.isLoggable(Level.CONFIG)) log.config(((PrintDataElement)obj).toStringX()); } else - log.config("- INVALID: " + obj); + if (log.isLoggable(Level.CONFIG)) log.config("- INVALID: " + obj); } } // dumpRow @@ -752,7 +752,7 @@ public class PrintData implements Serializable */ public static PrintData parseXML (Properties ctx, File input) { - log.config(input.toString()); + if (log.isLoggable(Level.CONFIG)) log.config(input.toString()); PrintData pd = null; try { diff --git a/org.adempiere.base/src/org/compiere/print/PrintFormatUtil.java b/org.adempiere.base/src/org/compiere/print/PrintFormatUtil.java index 146a851edd..f23d01a058 100644 --- a/org.adempiere.base/src/org/compiere/print/PrintFormatUtil.java +++ b/org.adempiere.base/src/org/compiere/print/PrintFormatUtil.java @@ -97,7 +97,7 @@ public class PrintFormatUtil */ public int addMissingColumns (MPrintFormat pf) { - log.config(pf.toString()); + if (log.isLoggable(Level.CONFIG)) log.config(pf.toString()); String sql = "SELECT c.AD_Column_ID, c.ColumnName " + "FROM AD_Column c " + "WHERE NOT EXISTS " diff --git a/org.adempiere.base/src/org/compiere/print/PrintUtil.java b/org.adempiere.base/src/org/compiere/print/PrintUtil.java index 52d92a6118..4aee43fe42 100644 --- a/org.adempiere.base/src/org/compiere/print/PrintUtil.java +++ b/org.adempiere.base/src/org/compiere/print/PrintUtil.java @@ -541,7 +541,7 @@ public class PrintUtil */ public static void setupPrintForm (int AD_Client_ID) { - log.config("AD_Client_ID=" + AD_Client_ID); + if (log.isLoggable(Level.CONFIG)) log.config("AD_Client_ID=" + AD_Client_ID); Properties ctx = Env.getCtx(); CLogMgt.enable(false); // diff --git a/org.adempiere.base/src/org/compiere/print/layout/TableElement.java b/org.adempiere.base/src/org/compiere/print/layout/TableElement.java index 060382895e..70957970ee 100644 --- a/org.adempiere.base/src/org/compiere/print/layout/TableElement.java +++ b/org.adempiere.base/src/org/compiere/print/layout/TableElement.java @@ -1189,7 +1189,7 @@ public class TableElement extends PrintElement int pageXindex = getPageXIndex(pageIndex); int pageYindex = getPageYIndex(pageIndex); if (DEBUG_PRINT) - log.config("Page=" + pageNo + " [x=" + pageXindex + ", y=" + pageYindex + "]"); + if (log.isLoggable(Level.CONFIG)) log.config("Page=" + pageNo + " [x=" + pageXindex + ", y=" + pageYindex + "]"); // int firstColumn = ((Integer)m_firstColumnOnPage.get(pageXindex)).intValue(); int nextPageColumn = m_columnHeader.length; // no of cols diff --git a/org.adempiere.base/src/org/compiere/report/MReportLine.java b/org.adempiere.base/src/org/compiere/report/MReportLine.java index a764ab1f55..b474fcf1c4 100644 --- a/org.adempiere.base/src/org/compiere/report/MReportLine.java +++ b/org.adempiere.base/src/org/compiere/report/MReportLine.java @@ -146,7 +146,7 @@ public class MReportLine extends X_PA_ReportLine ColumnName = col; else if (!ColumnName.equals(col)) { - log.config("More than one: " + ColumnName + " - " + col); + if (log.isLoggable(Level.CONFIG)) log.config("More than one: " + ColumnName + " - " + col); return null; } } diff --git a/org.adempiere.base/src/org/compiere/report/core/RModel.java b/org.adempiere.base/src/org/compiere/report/core/RModel.java index a52206b5bc..6c499447fd 100644 --- a/org.adempiere.base/src/org/compiere/report/core/RModel.java +++ b/org.adempiere.base/src/org/compiere/report/core/RModel.java @@ -19,6 +19,7 @@ package org.compiere.report.core; import java.io.Serializable; import java.util.ArrayList; import java.util.Properties; +import java.util.logging.Level; import org.compiere.util.CLogger; @@ -222,7 +223,7 @@ public class RModel implements Serializable */ public void setGroup (int col) { - log.config( "RModel.setGroup col=" + col); + if (log.isLoggable(Level.CONFIG)) log.config( "RModel.setGroup col=" + col); if (col < 0 || col >= m_data.cols.size()) return; Integer ii = new Integer(col); @@ -258,7 +259,7 @@ public class RModel implements Serializable */ public void setFunction (int col, String function) { - log.config( "RModel.setFunction col=" + col + " - " + function); + if (log.isLoggable(Level.CONFIG)) log.config( "RModel.setFunction col=" + col + " - " + function); if (col < 0 || col >= m_data.cols.size()) return; m_data.functions.put(new Integer(col), function); diff --git a/org.adempiere.base/src/org/compiere/util/CLogMgt.java b/org.adempiere.base/src/org/compiere/util/CLogMgt.java index e74a46ad2c..19a2897aa9 100644 --- a/org.adempiere.base/src/org/compiere/util/CLogMgt.java +++ b/org.adempiere.base/src/org/compiere/util/CLogMgt.java @@ -470,7 +470,7 @@ public class CLogMgt String key = pp[i].toString(); String value = p.getProperty(key); if (logIt) - log.config(key + "=" + value); + if (log.isLoggable(Level.CONFIG)) log.config(key + "=" + value); else System.out.println(" " + key + " = " + value); } diff --git a/org.adempiere.base/src/org/compiere/util/DB.java b/org.adempiere.base/src/org/compiere/util/DB.java index 8bbf83a9a3..58793bb66a 100644 --- a/org.adempiere.base/src/org/compiere/util/DB.java +++ b/org.adempiere.base/src/org/compiere/util/DB.java @@ -272,7 +272,7 @@ public final class DB s_cc.setDataSource(); - log.config(s_cc + " - DS=" + s_cc.isDataSource()); + if (log.isLoggable(Level.CONFIG)) log.config(s_cc + " - DS=" + s_cc.isDataSource()); // Trace.printStack(); } // setDBTarget diff --git a/org.adempiere.base/src/org/compiere/util/Language.java b/org.adempiere.base/src/org/compiere/util/Language.java index 0bf73da8c5..9c8b5e71a3 100644 --- a/org.adempiere.base/src/org/compiere/util/Language.java +++ b/org.adempiere.base/src/org/compiere/util/Language.java @@ -24,6 +24,7 @@ import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Arrays; import java.util.Locale; +import java.util.logging.Level; import java.util.logging.Logger; import javax.print.attribute.standard.MediaSize; @@ -421,7 +422,7 @@ public class Language implements Serializable if (language != null) { Env.setContext(Env.getCtx(), Env.LANGUAGE, language.getAD_Language()); - log.config(language.toString()); + if (log.isLoggable(Level.CONFIG)) log.config(language.toString()); } } // setLanguage @@ -504,7 +505,7 @@ public class Language implements Serializable if (AD_Language != null) { m_AD_Language = AD_Language; - log.config(toString()); + if (log.isLoggable(Level.CONFIG)) log.config(toString()); } } // getAD_Language diff --git a/org.adempiere.base/src/org/compiere/util/Login.java b/org.adempiere.base/src/org/compiere/util/Login.java index 22b1c3694b..675fc44fc3 100644 --- a/org.adempiere.base/src/org/compiere/util/Login.java +++ b/org.adempiere.base/src/org/compiere/util/Login.java @@ -631,7 +631,7 @@ public class Login // Do we look for trees? if (role.getAD_Tree_Org_ID() == 0) { - log.config("Summary Org=" + Summary_Name + "(" + Summary_Org_ID + ") - No Org Tree: " + role); + if (log.isLoggable(Level.CONFIG)) log.config("Summary Org=" + Summary_Name + "(" + Summary_Org_ID + ") - No Org Tree: " + role); return; } // Summary Org - Get Dependents diff --git a/org.adempiere.base/src/org/compiere/util/SecureEngine.java b/org.adempiere.base/src/org/compiere/util/SecureEngine.java index d9fd5cf5da..b704663d40 100644 --- a/org.adempiere.base/src/org/compiere/util/SecureEngine.java +++ b/org.adempiere.base/src/org/compiere/util/SecureEngine.java @@ -19,6 +19,7 @@ package org.compiere.util; import java.io.UnsupportedEncodingException; import java.security.NoSuchAlgorithmException; import java.util.Properties; +import java.util.logging.Level; import java.util.logging.Logger; /** @@ -214,7 +215,7 @@ public class SecureEngine throw new IllegalStateException(realClass + ": " + TEST + "->" + testE + "->" + testC); - log.config (realClass + " initialized - " + implementation); + if (log.isLoggable(Level.CONFIG)) log.config (realClass + " initialized - " + implementation); } // SecureEngine diff --git a/org.adempiere.base/src/org/compiere/util/WebEnv.java b/org.adempiere.base/src/org/compiere/util/WebEnv.java index 03d2c04df4..62fd93ae01 100644 --- a/org.adempiere.base/src/org/compiere/util/WebEnv.java +++ b/org.adempiere.base/src/org/compiere/util/WebEnv.java @@ -303,8 +303,8 @@ public class WebEnv */ public static void dump (ServletConfig config) { - log.config("ServletConfig " + config.getServletName()); - log.config("- Context=" + config.getServletContext()); + if (log.isLoggable(Level.CONFIG))log.config("ServletConfig " + config.getServletName()); + if (log.isLoggable(Level.CONFIG))log.config("- Context=" + config.getServletContext()); if (!CLogMgt.isLevelFiner()) return; boolean first = true; @@ -326,8 +326,8 @@ public class WebEnv */ public static void dump (ServletContext ctx) { - log.config("ServletContext " + ctx.getServletContextName()); - log.config("- ServerInfo=" + ctx.getServerInfo()); + if (log.isLoggable(Level.CONFIG)) log.config("ServletContext " + ctx.getServletContextName()); + if (log.isLoggable(Level.CONFIG)) log.config("- ServerInfo=" + ctx.getServerInfo()); if (!CLogMgt.isLevelFiner()) return; boolean first = true; @@ -360,8 +360,8 @@ public class WebEnv */ public static void dump (HttpSession session) { - log.config("Session " + session.getId()); - log.config("- Created=" + new Timestamp(session.getCreationTime())); + if (log.isLoggable(Level.CONFIG))log.config("Session " + session.getId()); + if (log.isLoggable(Level.CONFIG))log.config("- Created=" + new Timestamp(session.getCreationTime())); if (!CLogMgt.isLevelFiner()) return; boolean first = true; @@ -383,7 +383,7 @@ public class WebEnv */ public static void dump (HttpServletRequest request) { - log.config("Request " + request.getProtocol() + " " + request.getMethod()); + if (log.isLoggable(Level.CONFIG)) log.config("Request " + request.getProtocol() + " " + request.getMethod()); if (!CLogMgt.isLevelFiner()) return; log.finer("- Server=" + request.getServerName() + ", Port=" + request.getServerPort()); diff --git a/org.adempiere.base/src/org/compiere/util/WebSessionCtx.java b/org.adempiere.base/src/org/compiere/util/WebSessionCtx.java index a1727682ca..343168b8c2 100644 --- a/org.adempiere.base/src/org/compiere/util/WebSessionCtx.java +++ b/org.adempiere.base/src/org/compiere/util/WebSessionCtx.java @@ -22,6 +22,7 @@ import java.text.SimpleDateFormat; import java.util.Enumeration; import java.util.Locale; import java.util.Properties; +import java.util.logging.Level; import javax.servlet.ServletContext; import javax.servlet.http.HttpServletRequest; @@ -122,7 +123,7 @@ public class WebSessionCtx implements Serializable String key = (String)en.nextElement(); String value = sc.getInitParameter(key); ctx.setProperty(key, value); - log.config (key + "=" + value); + if (log.isLoggable(Level.CONFIG)) log.config (key + "=" + value); } setWStore (request.getContextPath()); @@ -157,7 +158,7 @@ public class WebSessionCtx implements Serializable String key = (String)en.nextElement(); String value = sc.getInitParameter(key); ctx.setProperty(key, value); - log.config (key + "=" + value); + if (log.isLoggable(Level.CONFIG)) log.config (key + "=" + value); } setWStore (W_Store_ID); diff --git a/org.adempiere.base/src/org/compiere/util/WebUser.java b/org.adempiere.base/src/org/compiere/util/WebUser.java index e4859d6a28..c54dc9a1fa 100644 --- a/org.adempiere.base/src/org/compiere/util/WebUser.java +++ b/org.adempiere.base/src/org/compiere/util/WebUser.java @@ -269,7 +269,7 @@ public class WebUser if (m_loc == null) m_loc = new MLocation (m_ctx, 0, null); // - log.config(m_bp + " - " + m_bpc); + if (log.isLoggable(Level.CONFIG)) log.config(m_bp + " - " + m_bpc); } // load /** diff --git a/org.adempiere.base/src/org/compiere/wf/DocWorkflowManager.java b/org.adempiere.base/src/org/compiere/wf/DocWorkflowManager.java index c5d91ac441..3705691ab5 100644 --- a/org.adempiere.base/src/org/compiere/wf/DocWorkflowManager.java +++ b/org.adempiere.base/src/org/compiere/wf/DocWorkflowManager.java @@ -128,7 +128,7 @@ public class DocWorkflowManager implements DocWorkflowMgr // if (wf.start(pi, document.get_TrxName()) != null) { - log.config(wf.getName()); + if (log.isLoggable(Level.CONFIG)) log.config(wf.getName()); m_noStarted++; started = true; } diff --git a/org.adempiere.install/src/org/compiere/install/ConfigurationData.java b/org.adempiere.install/src/org/compiere/install/ConfigurationData.java index 5f8b89974b..d37f85cfcc 100644 --- a/org.adempiere.install/src/org/compiere/install/ConfigurationData.java +++ b/org.adempiere.install/src/org/compiere/install/ConfigurationData.java @@ -652,7 +652,7 @@ public class ConfigurationData props.put("mail.store.protocol", "imaps"); } - log.config("Connecting to " + mailServer.getHostName()); + if (log.isLoggable(Level.CONFIG)) log.config("Connecting to " + mailServer.getHostName()); // Session session = null; Store store = null; @@ -661,10 +661,10 @@ public class ConfigurationData EMailAuthenticator auth = new EMailAuthenticator (mailUser, mailPassword); session = Session.getDefaultInstance(props, auth); session.setDebug (CLogMgt.isLevelFinest()); - log.config("Session=" + session); + if (log.isLoggable(Level.CONFIG)) log.config("Session=" + session); // Connect to Store store = session.getStore(isGmail ? "imaps" : "imap"); - log.config("Store=" + store); + if (log.isLoggable(Level.CONFIG)) log.config("Store=" + store); } catch (NoSuchProviderException nsp) { diff --git a/org.adempiere.install/src/org/compiere/install/KeyStoreMgt.java b/org.adempiere.install/src/org/compiere/install/KeyStoreMgt.java index 99926afd6c..9a6bc7bba9 100644 --- a/org.adempiere.install/src/org/compiere/install/KeyStoreMgt.java +++ b/org.adempiere.install/src/org/compiere/install/KeyStoreMgt.java @@ -189,7 +189,7 @@ public class KeyStoreMgt */ public Certificate getCertificate (String alias) throws Exception { - log.config("Alias=" + alias); + if (log.isLoggable(Level.CONFIG)) log.config("Alias=" + alias); Date date = m_keyStore.getCreationDate(alias); if (date == null) // no certificate diff --git a/org.adempiere.ui.swing/src/org/adempiere/plaf/AdempierePLAF.java b/org.adempiere.ui.swing/src/org/adempiere/plaf/AdempierePLAF.java index 8e5c30d52b..05abd0cfc5 100644 --- a/org.adempiere.ui.swing/src/org/adempiere/plaf/AdempierePLAF.java +++ b/org.adempiere.ui.swing/src/org/adempiere/plaf/AdempierePLAF.java @@ -28,6 +28,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.ResourceBundle; +import java.util.logging.Level; import java.util.logging.Logger; import javax.swing.ImageIcon; @@ -472,7 +473,7 @@ public final class AdempierePLAF { if (plaf == null) return; - log.config(plaf + (theme == null ? "" : (" - " + theme))); + if (log.isLoggable(Level.CONFIG)) log.config(plaf + (theme == null ? "" : (" - " + theme))); // Look & Feel Class lafClass = null; @@ -533,7 +534,7 @@ public final class AdempierePLAF { log.severe(e.getMessage()); } - log.config(plaf + " - " + theme); + if (log.isLoggable(Level.CONFIG)) log.config(plaf + " - " + theme); // printPLAFDefaults(); } // setPLAF diff --git a/org.adempiere.ui.swing/src/org/compiere/acct/AcctViewer.java b/org.adempiere.ui.swing/src/org/compiere/acct/AcctViewer.java index c113821703..727f516263 100644 --- a/org.adempiere.ui.swing/src/org/compiere/acct/AcctViewer.java +++ b/org.adempiere.ui.swing/src/org/compiere/acct/AcctViewer.java @@ -631,7 +631,7 @@ public class AcctViewer extends CFrame bQuery.setEnabled(false); statusLine.setText(" " + Msg.getMsg(Env.getCtx(), "Processing")); - log.config(para.toString()); + if (log.isLoggable(Level.CONFIG)) log.config(para.toString()); Thread.yield(); // Switch to Result pane @@ -674,7 +674,7 @@ public class AcctViewer extends CFrame { ValueNamePair vp = (ValueNamePair)selTable.getSelectedItem(); m_data.AD_Table_ID = ((Integer)m_data.tableInfo.get(vp.getValue())).intValue(); - log.config(vp.getValue() + " = " + m_data.AD_Table_ID); + if (log.isLoggable(Level.CONFIG)) log.config(vp.getValue() + " = " + m_data.AD_Table_ID); // Reset Record m_data.Record_ID = 0; selRecord.setText(""); @@ -761,7 +761,7 @@ public class AcctViewer extends CFrame } // Save for query - log.config(keyColumn + " - " + key); + if (log.isLoggable(Level.CONFIG)) log.config(keyColumn + " - " + key); if (button == selRecord) // Record_ID m_data.Record_ID = key.intValue(); else diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/AArchive.java b/org.adempiere.ui.swing/src/org/compiere/apps/AArchive.java index 8a96168aa7..eeaa5b368f 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/AArchive.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/AArchive.java @@ -55,7 +55,7 @@ public class AArchive implements ActionListener public AArchive (JComponent invoker, int AD_Table_ID, int Record_ID) { super (); - log.config("AD_Table_ID=" + AD_Table_ID + ", Record_ID=" + Record_ID); + if (log.isLoggable(Level.CONFIG)) log.config("AD_Table_ID=" + AD_Table_ID + ", Record_ID=" + Record_ID); m_AD_Table_ID = AD_Table_ID; m_Record_ID = Record_ID; getArchives(invoker); diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/AChat.java b/org.adempiere.ui.swing/src/org/compiere/apps/AChat.java index 8c47f27636..636b4e36e7 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/AChat.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/AChat.java @@ -65,7 +65,7 @@ public class AChat extends CDialog { super (frame, Msg.getMsg(Env.getCtx(), "Chat") + " " + Description, true); // needs to be modal otherwise APanel does not recongize change. - log.config("ID=" + CM_Chat_ID + if (log.isLoggable(Level.CONFIG)) log.config("ID=" + CM_Chat_ID + ", Table=" + AD_Table_ID + ", Record=" + Record_ID); // m_WindowNo = WindowNo; diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/AEnv.java b/org.adempiere.ui.swing/src/org/compiere/apps/AEnv.java index 243d0cb576..82afef5f8c 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/AEnv.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/AEnv.java @@ -673,7 +673,7 @@ public final class AEnv AD_Window_ID = PO_Window_ID; } - log.config(TableName + " - Record_ID=" + Record_ID + " (IsSOTrx=" + isSOTrx + ")"); + if (log.isLoggable(Level.CONFIG)) log.config(TableName + " - Record_ID=" + Record_ID + " (IsSOTrx=" + isSOTrx + ")"); AWindow frame = new AWindow(null); if (!frame.initWindow(AD_Window_ID, MQuery.getEqualQuery(TableName + "_ID", Record_ID))) return; @@ -737,7 +737,7 @@ public final class AEnv AD_Window_ID = PO_Window_ID; } - log.config(query + " (IsSOTrx=" + isSOTrx + ")"); + if (log.isLoggable(Level.CONFIG)) log.config(query + " (IsSOTrx=" + isSOTrx + ")"); AWindow frame = new AWindow(null); if (!frame.initWindow(AD_Window_ID, query)) return; @@ -817,7 +817,7 @@ public final class AEnv if (MRole.getDefault().isTableAccess (AD_Table_ID, true)) // RO s_workflow = Boolean.TRUE; else - log.config(s_workflow.toString()); + if (log.isLoggable(Level.CONFIG)) log.config(s_workflow.toString()); } // Get Window if (s_workflow.booleanValue()) @@ -827,7 +827,7 @@ public final class AEnv if (s_workflow_Window_ID == 0) s_workflow_Window_ID = 297; // fallback HARDCODED // s_workflow = Boolean.FALSE; - log.config(s_workflow + ", Window=" + s_workflow_Window_ID); + if (log.isLoggable(Level.CONFIG)) log.config(s_workflow + ", Window=" + s_workflow_Window_ID); } } return s_workflow.booleanValue(); @@ -902,7 +902,7 @@ public final class AEnv try { s_serverTries++; - log.config("try #" + s_serverTries); + if (log.isLoggable(Level.CONFIG)) log.config("try #" + s_serverTries); ok = CConnection.get().isAppsServerOK(true); if (ok) s_serverTries = 0; @@ -939,7 +939,7 @@ public final class AEnv public static String postImmediate (int WindowNo, int AD_Client_ID, int AD_Table_ID, int Record_ID, boolean force) { - log.config("Window=" + WindowNo + if (log.isLoggable(Level.CONFIG)) log.config("Window=" + WindowNo + ", AD_Table_ID=" + AD_Table_ID + "/" + Record_ID + ", Force=" + force); @@ -955,7 +955,7 @@ public final class AEnv */ public static void cacheReset (String tableName, int Record_ID) { - log.config("TableName=" + tableName + ", Record_ID=" + Record_ID); + if (log.isLoggable(Level.CONFIG)) log.config("TableName=" + tableName + ", Record_ID=" + Record_ID); // try to get from Server when enabled if (isServerActive()) diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/AExport.java b/org.adempiere.ui.swing/src/org/compiere/apps/AExport.java index 4b0a5952f7..002da6a387 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/AExport.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/AExport.java @@ -95,7 +95,7 @@ public class AExport return; } ext = ext.substring(ext.lastIndexOf('.')+1).toLowerCase(); - log.config( "File=" + outFile.getPath() + "; Type=" + ext); + if (log.isLoggable(Level.CONFIG)) log.config( "File=" + outFile.getPath() + "; Type=" + ext); parent.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); this.parent = parent; diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/AGlassPane.java b/org.adempiere.ui.swing/src/org/compiere/apps/AGlassPane.java index a1a34b518b..85bc294087 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/AGlassPane.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/AGlassPane.java @@ -112,7 +112,7 @@ public class AGlassPane extends JPanel implements MouseListener, ActionListener */ public void setBusyTimer (int time) { - log.config("Time=" + time); + if (log.isLoggable(Level.CONFIG)) log.config("Time=" + time); // should we display a progress bar? if (time < 2 ) { diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/ALogin.java b/org.adempiere.ui.swing/src/org/compiere/apps/ALogin.java index 73c60d8a0e..ae05b8d743 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/ALogin.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/ALogin.java @@ -959,7 +959,7 @@ public final class ALogin extends CDialog KeyNamePair client = (KeyNamePair)clientCombo.getSelectedItem(); if (client == null || m_comboActive) return; - log.config(": " + client); + if (log.isLoggable(Level.CONFIG)) log.config(": " + client); m_comboActive = true; // @Trifon - Set Proper "#AD_Client_ID", #AD_User_ID and "#SalesRep_ID" // https://sourceforge.net/tracker/?func=detail&aid=2957215&group_id=176962&atid=879332 @@ -1025,7 +1025,7 @@ public final class ALogin extends CDialog KeyNamePair rol = (KeyNamePair)roleCombo.getSelectedItem(); if (rol == null || m_comboActive) return; - log.config(": " + rol); + if (log.isLoggable(Level.CONFIG)) log.config(": " + rol); m_comboActive = true; if( Env.getContextAsInt(m_ctx, "#AD_Client_ID") > 0 ) @@ -1086,7 +1086,7 @@ public final class ALogin extends CDialog KeyNamePair org = (KeyNamePair)orgCombo.getSelectedItem(); if (org == null || m_comboActive) return; - log.config(": " + org); + if (log.isLoggable(Level.CONFIG)) log.config(": " + org); m_comboActive = true; // KeyNamePair[] whs = m_login.getWarehouses(org); @@ -1127,7 +1127,7 @@ public final class ALogin extends CDialog String version = AEnv.getServerVersion(); if (Adempiere.DATE_VERSION.equals(version)) { - log.config("Server = Client - " + version); + if (log.isLoggable(Level.CONFIG)) log.config("Server = Client - " + version); retValue = true; } else if (version != null) diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/APanel.java b/org.adempiere.ui.swing/src/org/compiere/apps/APanel.java index caddc1bbdc..838c7a6fc5 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/APanel.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/APanel.java @@ -1509,7 +1509,7 @@ public final class APanel extends CPanel if (!m_curTab.isReadOnly() && (Env.isAutoNew(m_ctx, m_curWindowNo) || m_curTab.isQueryNewRecord())) { - log.config("No record - New - AutoNew=" + Env.isAutoNew(m_ctx, m_curWindowNo) + if (log.isLoggable(Level.CONFIG)) log.config("No record - New - AutoNew=" + Env.isAutoNew(m_ctx, m_curWindowNo) + " - QueryNew=" + m_curTab.isQueryNewRecord()); m_curTab.dataNew(false); } @@ -1904,7 +1904,7 @@ public final class APanel extends CPanel */ private void cmd_new (boolean copy) { - log.config("copy=" + copy); + if (log.isLoggable(Level.CONFIG)) log.config("copy=" + copy); if (!m_curTab.isInsertRecord()) { log.warning("Insert Record disabled for Tab"); @@ -2066,7 +2066,7 @@ public final class APanel extends CPanel { if (m_curAPanelTab != null) manualCmd = false; - log.config("Manual=" + manualCmd); + if (log.isLoggable(Level.CONFIG)) log.config("Manual=" + manualCmd); m_errorDisplayed = false; m_curGC.stopEditor(true); m_curGC.acceptEditorChanges(); @@ -2575,7 +2575,7 @@ public final class APanel extends CPanel MRole role = MRole.getDefault(); int maxRows = role.getMaxQueryRecords(); // - log.config("OnlyCurrent=" + m_onlyCurrentRows + if (log.isLoggable(Level.CONFIG)) log.config("OnlyCurrent=" + m_onlyCurrentRows + ", Days=" + m_onlyCurrentDays + ", MaxRows=" + maxRows); m_curGC.query(m_onlyCurrentRows, m_onlyCurrentDays, maxRows ); // autoSize @@ -2811,7 +2811,7 @@ public final class APanel extends CPanel * or invoke user form */ - log.config("Process_ID=" + processID + ", Record_ID=" + record_ID); + if (log.isLoggable(Level.CONFIG)) log.config("Process_ID=" + processID + ", Record_ID=" + record_ID); if (processID == 0) { if (isProcessMandatory) @@ -3097,7 +3097,7 @@ public final class APanel extends CPanel X_AD_ToolBarButton tbt = new X_AD_ToolBarButton(m_ctx, ToolBarButton_ID, null); String restrictName = tbt.getComponentName(); - log.config("tbt="+tbt.getAD_ToolBarButton_ID() + " / " + restrictName); + if (log.isLoggable(Level.CONFIG)) log.config("tbt="+tbt.getAD_ToolBarButton_ID() + " / " + restrictName); boolean found=false; // remove from ToolBar diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/ARequest.java b/org.adempiere.ui.swing/src/org/compiere/apps/ARequest.java index efb98d00e0..a19a232bee 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/ARequest.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/ARequest.java @@ -72,7 +72,7 @@ public class ARequest implements ActionListener int C_BPartner_ID) { super (); - log.config("AD_Table_ID=" + AD_Table_ID + ", Record_ID=" + Record_ID); + if (log.isLoggable(Level.CONFIG)) log.config("AD_Table_ID=" + AD_Table_ID + ", Record_ID=" + Record_ID); m_AD_Table_ID = AD_Table_ID; m_Record_ID = Record_ID; m_C_BPartner_ID = C_BPartner_ID; diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/AWindow.java b/org.adempiere.ui.swing/src/org/compiere/apps/AWindow.java index a013e8856b..c0b60dd349 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/AWindow.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/AWindow.java @@ -20,6 +20,7 @@ import java.awt.BorderLayout; import java.awt.GraphicsConfiguration; import java.awt.Image; import java.awt.event.WindowEvent; +import java.util.logging.Level; import org.compiere.model.MQuery; import org.compiere.swing.CFrame; @@ -130,7 +131,7 @@ public class AWindow extends CFrame { if (busy == m_glassPane.isVisible()) return; - log.config(getName() + " - " + busy); + if (log.isLoggable(Level.CONFIG)) log.config(getName() + " - " + busy); m_glassPane.setMessage(null); m_glassPane.setVisible(busy); if (busy) diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/Attachment.java b/org.adempiere.ui.swing/src/org/compiere/apps/Attachment.java index 6d83eb01dc..2206b4cee4 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/Attachment.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/Attachment.java @@ -79,7 +79,7 @@ public final class Attachment extends CDialog { super (frame, Msg.getMsg(Env.getCtx(), "Attachment"), true); // needs to be modal otherwise APanel does not recognize change. - log.config("ID=" + AD_Attachment_ID + if (log.isLoggable(Level.CONFIG)) log.config("ID=" + AD_Attachment_ID + ", Table=" + AD_Table_ID + ", Record=" + Record_ID); // m_WindowNo = WindowNo; @@ -260,7 +260,7 @@ public final class Attachment extends CDialog private void displayData (int index) { MAttachmentEntry entry = m_attachment.getEntry(index); - log.config("Index=" + index + " - " + entry); + if (log.isLoggable(Level.CONFIG)) log.config("Index=" + index + " - " + entry); // Reset UI gifPanel.setImage(null); @@ -281,7 +281,7 @@ public final class Attachment extends CDialog bOpen.setEnabled(true); bSave.setEnabled(true); bDelete.setEnabled(true); - log.config(entry.toStringX()); + if (log.isLoggable(Level.CONFIG)) log.config(entry.toStringX()); // info.setText(entry.toStringX()); if (entry.isPDF() && pdfViewer != null) @@ -329,7 +329,7 @@ public final class Attachment extends CDialog graphPanel.add(info, BorderLayout.CENTER); } - log.config("Size=" + size); + if (log.isLoggable(Level.CONFIG)) log.config("Size=" + size); // graphPanel.setPreferredSize(size); // centerPane.setDividerLocation(size.width+30); // size.width += 100; @@ -509,7 +509,7 @@ public final class Attachment extends CDialog String fileName = getFileName(index); String ext = fileName.substring (fileName.lastIndexOf('.')); - log.config( "Ext=" + ext); + if (log.isLoggable(Level.CONFIG)) log.config( "Ext=" + ext); JFileChooser chooser = new JFileChooser(); chooser.setDialogType(JFileChooser.SAVE_DIALOG); @@ -524,7 +524,7 @@ public final class Attachment extends CDialog if (saveFile == null) return; - log.config("Save to " + saveFile.getAbsolutePath()); + if (log.isLoggable(Level.CONFIG)) log.config("Save to " + saveFile.getAbsolutePath()); m_attachment.getEntryFile(index, saveFile); } // saveAttachmentToFile diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/ScreenShot.java b/org.adempiere.ui.swing/src/org/compiere/apps/ScreenShot.java index 1dbe927595..4d26553f0c 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/ScreenShot.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/ScreenShot.java @@ -62,7 +62,7 @@ public class ScreenShot File file = getJPGFile (window); if (file == null) return false; - log.config("File=" + file); + if (log.isLoggable(Level.CONFIG)) log.config("File=" + file); if (file.exists()) file.delete(); diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/form/ArchiveViewer.java b/org.adempiere.ui.swing/src/org/compiere/apps/form/ArchiveViewer.java index 5ee5138929..2709ecf5bd 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/form/ArchiveViewer.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/form/ArchiveViewer.java @@ -311,7 +311,7 @@ public class ArchiveViewer extends Archive private void updateQDisplay() { boolean reports = reportField.isSelected(); - log.config("Reports=" + reports); + if (log.isLoggable(Level.CONFIG)) log.config("Reports=" + reports); // Show processLabel.setVisible(reports); processField.setVisible(reports); @@ -419,7 +419,7 @@ public class ArchiveViewer extends Archive */ public void query (boolean isReport, int AD_Table_ID, int Record_ID) { - log.config("Report=" + isReport + ", AD_Table_ID=" + AD_Table_ID + ",Record_ID=" + Record_ID); + if (log.isLoggable(Level.CONFIG)) log.config("Report=" + isReport + ", AD_Table_ID=" + AD_Table_ID + ",Record_ID=" + Record_ID); reportField.setSelected(isReport); m_AD_Table_ID = AD_Table_ID; m_Record_ID = Record_ID; diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/form/VAllocation.java b/org.adempiere.ui.swing/src/org/compiere/apps/form/VAllocation.java index 64259f6305..869cbe6aec 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/form/VAllocation.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/form/VAllocation.java @@ -353,7 +353,7 @@ public class VAllocation extends Allocation { String name = e.getPropertyName(); Object value = e.getNewValue(); - log.config(name + "=" + value); + if (log.isLoggable(Level.CONFIG)) log.config(name + "=" + value); if (value == null) return; diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/form/VBOMDrop.java b/org.adempiere.ui.swing/src/org/compiere/apps/form/VBOMDrop.java index c16e2ddb25..c33c010ba5 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/form/VBOMDrop.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/form/VBOMDrop.java @@ -299,7 +299,7 @@ public class VBOMDrop extends CPanel */ private void createMainPanel () { - log.config(": " + m_product); + if (log.isLoggable(Level.CONFIG)) log.config(": " + m_product); this.removeAll(); this.setPreferredSize(null); this.invalidate(); @@ -453,7 +453,7 @@ public class VBOMDrop extends CPanel */ public void actionPerformed (ActionEvent e) { - log.config(e.getActionCommand()); + if (log.isLoggable(Level.CONFIG)) log.config(e.getActionCommand()); Object source = e.getSource(); @@ -623,7 +623,7 @@ public class VBOMDrop extends CPanel */ private boolean cmd_saveOrder (int C_Order_ID) { - log.config("C_Order_ID=" + C_Order_ID); + if (log.isLoggable(Level.CONFIG)) log.config("C_Order_ID=" + C_Order_ID); MOrder order = new MOrder (Env.getCtx(), C_Order_ID, null); if (order.get_ID() == 0) { @@ -652,7 +652,7 @@ public class VBOMDrop extends CPanel } // line selected } // for all bom lines - log.config("#" + lineCount); + if (log.isLoggable(Level.CONFIG)) log.config("#" + lineCount); return true; } // cmd_saveOrder @@ -663,7 +663,7 @@ public class VBOMDrop extends CPanel */ private boolean cmd_saveInvoice (int C_Invoice_ID) { - log.config("C_Invoice_ID=" + C_Invoice_ID); + if (log.isLoggable(Level.CONFIG)) log.config("C_Invoice_ID=" + C_Invoice_ID); MInvoice invoice = new MInvoice (Env.getCtx(), C_Invoice_ID, null); if (invoice.get_ID() == 0) { @@ -692,7 +692,7 @@ public class VBOMDrop extends CPanel } // line selected } // for all bom lines - log.config("#" + lineCount); + if (log.isLoggable(Level.CONFIG)) log.config("#" + lineCount); return true; } // cmd_saveInvoice @@ -703,7 +703,7 @@ public class VBOMDrop extends CPanel */ private boolean cmd_saveProject (int C_Project_ID) { - log.config("C_Project_ID=" + C_Project_ID); + if (log.isLoggable(Level.CONFIG)) log.config("C_Project_ID=" + C_Project_ID); MProject project = new MProject (Env.getCtx(), C_Project_ID, null); if (project.get_ID() == 0) { @@ -731,7 +731,7 @@ public class VBOMDrop extends CPanel } // line selected } // for all bom lines - log.config("#" + lineCount); + if (log.isLoggable(Level.CONFIG)) log.config("#" + lineCount); return true; } // cmd_saveProject diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/form/VFileImport.java b/org.adempiere.ui.swing/src/org/compiere/apps/form/VFileImport.java index 231dd386f9..a88593eb7b 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/form/VFileImport.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/form/VFileImport.java @@ -312,7 +312,7 @@ public class VFileImport extends CPanel if (chooser.showOpenDialog(this) != JFileChooser.APPROVE_OPTION) return; m_file = chooser.getSelectedFile(); - log.config(m_file.getName()); + if (log.isLoggable(Level.CONFIG)) log.config(m_file.getName()); bFile.setText(m_file.getName()); cmd_reloadFile(); } @@ -361,7 +361,7 @@ public class VFileImport extends CPanel info.setText(Msg.getMsg(Env.getCtx(), "Records") + "=" + m_data.size() + ", " + Msg.getMsg(Env.getCtx(), "Length") + "=" + length + " "); setCursor (Cursor.getDefaultCursor()); - log.config("Records=" + m_data.size() + if (log.isLoggable(Level.CONFIG)) log.config("Records=" + m_data.size() + ", Length=" + length); } // cmd_loadFile @@ -451,7 +451,7 @@ public class VFileImport extends CPanel ADialog.error(m_WindowNo, this, "FileImportNoFormat"); return; } - log.config(m_format.getName()); + if (log.isLoggable(Level.CONFIG)) log.config(m_format.getName()); // For all rows - update/insert DB table int row = 0; diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/form/VGenPanel.java b/org.adempiere.ui.swing/src/org/compiere/apps/form/VGenPanel.java index 5ccd53341a..f00abd1c66 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/form/VGenPanel.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/form/VGenPanel.java @@ -281,7 +281,7 @@ public class VGenPanel extends CPanel implements ActionListener, ChangeListener, int[] ids = pi.getIDs(); if (ids == null || ids.length == 0) return; - log.config("PrintItems=" + ids.length); + if (log.isLoggable(Level.CONFIG)) log.config("PrintItems=" + ids.length); confirmPanelGen.getOKButton().setEnabled(false); // OK to print diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/form/VMatch.java b/org.adempiere.ui.swing/src/org/compiere/apps/form/VMatch.java index 5174120aec..ab5b929113 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/form/VMatch.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/form/VMatch.java @@ -423,7 +423,7 @@ public class VMatch extends Match private void cmd_searchTo() { int row = xMatchedTable.getSelectedRow(); - log.config("Row=" + row); + if (log.isLoggable(Level.CONFIG)) log.config("Row=" + row); double qty = 0.0; if (row < 0) @@ -463,7 +463,7 @@ public class VMatch extends Match { if (e.getColumn() != 0) return; - log.config("Row=" + e.getFirstRow() + "-" + e.getLastRow() + ", Col=" + e.getColumn() + if (log.isLoggable(Level.CONFIG)) log.config("Row=" + e.getFirstRow() + "-" + e.getLastRow() + ", Col=" + e.getColumn() + ", Type=" + e.getType()); panel.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/form/VPayPrint.java b/org.adempiere.ui.swing/src/org/compiere/apps/form/VPayPrint.java index 612620b696..7476d0e531 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/form/VPayPrint.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/form/VPayPrint.java @@ -475,7 +475,7 @@ public class VPayPrint extends PayPrint implements FormPanel, ActionListener, Ve // get data int startDocumentNo = ((Number)fDocumentNo.getValue()).intValue(); - log.config("C_PaySelection_ID=" + m_C_PaySelection_ID + ", PaymentRule=" + PaymentRule + ", DocumentNo=" + startDocumentNo); + if (log.isLoggable(Level.CONFIG)) log.config("C_PaySelection_ID=" + m_C_PaySelection_ID + ", PaymentRule=" + PaymentRule + ", DocumentNo=" + startDocumentNo); // panel.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); @@ -504,7 +504,7 @@ public class VPayPrint extends PayPrint implements FormPanel, ActionListener, Ve throws PropertyVetoException { String name = e.getPropertyName(); Object value = e.getNewValue(); - log.config(name + "=" + value); + if (log.isLoggable(Level.CONFIG)) log.config(name + "=" + value); if (value == null) return; diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/form/VPaySelect.java b/org.adempiere.ui.swing/src/org/compiere/apps/form/VPaySelect.java index 5e1fbd6c2d..80456e717a 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/form/VPaySelect.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/form/VPaySelect.java @@ -270,7 +270,7 @@ public class VPaySelect extends PaySelect implements FormPanel, ActionListener, { Timestamp payDate = (Timestamp)fieldPayDate.getValue(); miniTable.setColorCompare(payDate); - log.config("PayDate=" + payDate); + if (log.isLoggable(Level.CONFIG)) log.config("PayDate=" + payDate); BankInfo bi = (BankInfo)fieldBankAccount.getSelectedItem(); diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/form/VStatementCreateFromBatch.java b/org.adempiere.ui.swing/src/org/compiere/apps/form/VStatementCreateFromBatch.java index d16c920cab..623e502036 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/form/VStatementCreateFromBatch.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/form/VStatementCreateFromBatch.java @@ -282,7 +282,7 @@ public class VStatementCreateFromBatch extends StatementCreateFromBatch implemen */ public void actionPerformed(ActionEvent e) { - log.config("Action=" + e.getActionCommand()); + if (log.isLoggable(Level.CONFIG)) log.config("Action=" + e.getActionCommand()); // Object source = e.getSource(); if(e.getActionCommand().equals(ConfirmPanel.A_REFRESH)) { diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/form/VTreeMaintenance.java b/org.adempiere.ui.swing/src/org/compiere/apps/form/VTreeMaintenance.java index 9a55d4c2f2..e1db2efddc 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/form/VTreeMaintenance.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/form/VTreeMaintenance.java @@ -210,7 +210,7 @@ public class VTreeMaintenance extends TreeMaintenance model.addElement(item); // List - log.config("#" + model.getSize()); + if (log.isLoggable(Level.CONFIG)) log.config("#" + model.getSize()); centerList.setModel(model); // Tree centerTree.initTree(m_tree.getAD_Tree_ID()); diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/search/Find.java b/org.adempiere.ui.swing/src/org/compiere/apps/search/Find.java index f030f99075..ccdda3e7f8 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/search/Find.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/search/Find.java @@ -570,7 +570,7 @@ public final class Find extends CDialog */ private void addSelectionColumn (GridField mField) { - log.config(mField.getHeader()); + if (log.isLoggable(Level.CONFIG)) log.config(mField.getHeader()); int displayLength = mField.getDisplayLength(); if (displayLength > FIELDLENGTH) mField.setDisplayLength(FIELDLENGTH); @@ -845,7 +845,7 @@ public final class Find extends CDialog if (columnName != null) { - log.config("Column: " + columnName); + if (log.isLoggable(Level.CONFIG)) log.config("Column: " + columnName); int referenceType = -1; MTable table = MTable.get(Env.getCtx(), m_tableName); MColumn col = table.getColumn(columnName); @@ -1606,7 +1606,7 @@ public final class Find extends CDialog */ private int getNoOfRecords (MQuery query, boolean alertZeroRecords) { - log.config("" + query); + if (log.isLoggable(Level.CONFIG)) log.config("" + query); StringBuilder sql = new StringBuilder("SELECT COUNT(*) FROM "); sql.append(m_tableName); boolean hasWhere = false; @@ -1660,7 +1660,7 @@ public final class Find extends CDialog m_total = 0; // return 0 if more then allowed - teo_sarca [ 1708717 ] } else - log.config("#" + m_total); + if (log.isLoggable(Level.CONFIG)) log.config("#" + m_total); // if (query != null) statusBar.setStatusToolTip (query.getWhereClause()); @@ -1684,7 +1684,7 @@ public final class Find extends CDialog */ public void dataStatusChanged (DataStatusEvent e) { - log.config(e.getMessage()); + if (log.isLoggable(Level.CONFIG)) log.config(e.getMessage()); // Action control boolean changed = e.isChanged(); bIgnore.setEnabled(changed); diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/search/FindValueEditor.java b/org.adempiere.ui.swing/src/org/compiere/apps/search/FindValueEditor.java index 92c9b5c3b1..64680efeb8 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/search/FindValueEditor.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/search/FindValueEditor.java @@ -18,6 +18,7 @@ package org.compiere.apps.search; import java.awt.Component; import java.util.EventObject; +import java.util.logging.Level; import javax.swing.AbstractCellEditor; import javax.swing.JTable; @@ -81,7 +82,7 @@ public final class FindValueEditor extends AbstractCellEditor implements TableCe if (m_editor == null) return null; Object obj = m_editor.getValue(); // returns Integer, BidDecimal, String - log.config("Obj=" + obj); + if (log.isLoggable(Level.CONFIG)) log.config("Obj=" + obj); return obj; /** if (obj == null) @@ -114,7 +115,7 @@ public final class FindValueEditor extends AbstractCellEditor implements TableCe m_between = true; boolean enabled = !m_valueToColumn || (m_valueToColumn && m_between); - log.config("(" + value + ") - Enabled=" + enabled); + if (log.isLoggable(Level.CONFIG)) log.config("(" + value + ") - Enabled=" + enabled); if ( enabled ) { diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/search/Info.java b/org.adempiere.ui.swing/src/org/compiere/apps/search/Info.java index 4badc03225..eb6396effc 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/search/Info.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/search/Info.java @@ -579,7 +579,7 @@ public abstract class Info extends CDialog if (p_table == null) return; - log.config( "OK=" + m_ok); + if (log.isLoggable(Level.CONFIG)) log.config( "OK=" + m_ok); if (!m_ok) // did not press OK { m_results.clear(); @@ -599,7 +599,7 @@ public abstract class Info extends CDialog if (data != null) m_results.add(data); } - log.config(getSelectedSQL()); + if (log.isLoggable(Level.CONFIG)) log.config(getSelectedSQL()); // Save Settings of detail info screens saveSelectionDetail(); @@ -726,7 +726,7 @@ public abstract class Info extends CDialog Object[] keys = getSelectedKeys(); if (keys == null || keys.length == 0) { - log.config("No Results - OK=" + if (log.isLoggable(Level.CONFIG)) log.config("No Results - OK=" + m_ok + ", Cancel=" + m_cancel); return ""; } @@ -859,7 +859,7 @@ public abstract class Info extends CDialog */ public void dispose(boolean ok) { - log.config("OK=" + ok); + if (log.isLoggable(Level.CONFIG)) log.config("OK=" + ok); m_ok = ok; // End Worker @@ -868,7 +868,7 @@ public abstract class Info extends CDialog // worker continues, but it does not block UI if (m_worker.isAlive()) m_worker.interrupt(); - log.config("Worker alive=" + m_worker.isAlive()); + if (log.isLoggable(Level.CONFIG)) log.config("Worker alive=" + m_worker.isAlive()); } m_worker = null; // diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/search/InfoProduct.java b/org.adempiere.ui.swing/src/org/compiere/apps/search/InfoProduct.java index 875a7e960a..df3c69557e 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/search/InfoProduct.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/search/InfoProduct.java @@ -670,7 +670,7 @@ public class InfoProduct extends Info implements ActionListener, ChangeListener */ private void setPriceListVersion(int M_PriceList_Version_ID) { - log.config("M_PriceList_Version_ID=" + M_PriceList_Version_ID); + if (log.isLoggable(Level.CONFIG)) log.config("M_PriceList_Version_ID=" + M_PriceList_Version_ID); for (int i = 0; i < pickPriceList.getItemCount(); i++) { KeyNamePair kn = (KeyNamePair)pickPriceList.getItemAt(i); @@ -706,7 +706,7 @@ public class InfoProduct extends Info implements ActionListener, ChangeListener if (priceDate == null) priceDate = new Timestamp(System.currentTimeMillis()); // - log.config("M_PriceList_ID=" + M_PriceList_ID + " - " + priceDate); + if (log.isLoggable(Level.CONFIG)) log.config("M_PriceList_ID=" + M_PriceList_ID + " - " + priceDate); int retValue = 0; String sql = "SELECT plv.M_PriceList_Version_ID, plv.ValidFrom " + "FROM M_PriceList pl, M_PriceList_Version plv " diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/search/InfoSchedule.java b/org.adempiere.ui.swing/src/org/compiere/apps/search/InfoSchedule.java index aaf0797ca7..49fc991a6e 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/search/InfoSchedule.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/search/InfoSchedule.java @@ -318,7 +318,7 @@ public class InfoSchedule extends CDialog m_mAssignment.setS_Resource_ID(S_Resource_ID); Timestamp date = fieldDate.getTimestamp(); int index = timePane.getSelectedIndex(); - log.config("Index=" + index + ", ID=" + S_Resource_ID + " - " + date); + if (log.isLoggable(Level.CONFIG)) log.config("Index=" + index + ", ID=" + S_Resource_ID + " - " + date); // Set Info m_loading = true; diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/search/InvoiceHistory.java b/org.adempiere.ui.swing/src/org/compiere/apps/search/InvoiceHistory.java index aef7cc3b94..1cbe8e8dd2 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/search/InvoiceHistory.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/search/InvoiceHistory.java @@ -77,7 +77,7 @@ public class InvoiceHistory extends CDialog int C_BPartner_ID, int M_Product_ID, int M_Warehouse_ID, int M_AttributeSetInstance_ID) { super(frame, Msg.getMsg(Env.getCtx(), "PriceHistory"), true); - log.config("C_BPartner_ID=" + C_BPartner_ID + if (log.isLoggable(Level.CONFIG)) log.config("C_BPartner_ID=" + C_BPartner_ID + ", M_Product_ID=" + M_Product_ID + ", M_Warehouse_ID=" + M_Warehouse_ID + ", M_AttributeSetInstance_ID=" + M_AttributeSetInstance_ID); diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/search/PAttributeInstance.java b/org.adempiere.ui.swing/src/org/compiere/apps/search/PAttributeInstance.java index 4e1c05bbe2..f1c35ac3d5 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/search/PAttributeInstance.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/search/PAttributeInstance.java @@ -195,7 +195,7 @@ public class PAttributeInstance extends CDialog */ private void dynInit(int C_BPartner_ID) { - log.config("C_BPartner_ID=" + C_BPartner_ID); + if (log.isLoggable(Level.CONFIG)) log.config("C_BPartner_ID=" + C_BPartner_ID); if (C_BPartner_ID != 0) { int ShelfLifeMinPct = 0; @@ -233,12 +233,12 @@ public class PAttributeInstance extends CDialog if (ShelfLifeMinPct > 0) { m_sqlMinLife = " AND COALESCE(TRUNC(((daysbetween(asi.GuaranteeDate, SYSDATE))/p.GuaranteeDays)*100),0)>=" + ShelfLifeMinPct; - log.config( "PAttributeInstance.dynInit - ShelfLifeMinPct=" + ShelfLifeMinPct); + if (log.isLoggable(Level.CONFIG)) log.config( "PAttributeInstance.dynInit - ShelfLifeMinPct=" + ShelfLifeMinPct); } if (ShelfLifeMinDays > 0) { m_sqlMinLife += " AND COALESCE((daysbetween(asi.GuaranteeDate, SYSDATE)),0)>=" + ShelfLifeMinDays; - log.config( "PAttributeInstance.dynInit - ShelfLifeMinDays=" + ShelfLifeMinDays); + if (log.isLoggable(Level.CONFIG)) log.config( "PAttributeInstance.dynInit - ShelfLifeMinDays=" + ShelfLifeMinDays); } } // BPartner != 0 diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/search/VSchedule.java b/org.adempiere.ui.swing/src/org/compiere/apps/search/VSchedule.java index 4835ca97b1..0dc972d3c8 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/search/VSchedule.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/search/VSchedule.java @@ -134,7 +134,7 @@ public class VSchedule extends CPanel cal.add(m_type, 1); m_endDate = new Timestamp (cal.getTimeInMillis()); // - log.config("(" + m_type + ") Resource_ID=" + S_Resource_ID + ": " + m_startDate + "->" + m_endDate); + if (log.isLoggable(Level.CONFIG)) log.config("(" + m_type + ") Resource_ID=" + S_Resource_ID + ": " + m_startDate + "->" + m_endDate); // Create Slots MAssignmentSlot[] mas = m_model.getAssignmentSlots (S_Resource_ID, m_startDate, m_endDate, null, true, null); MAssignmentSlot[] mts = m_model.getDayTimeSlots (); diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/wf/WFActivity.java b/org.adempiere.ui.swing/src/org/compiere/apps/wf/WFActivity.java index fcee145a41..f374712819 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/wf/WFActivity.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/wf/WFActivity.java @@ -648,7 +648,7 @@ public class WFActivity extends CPanel */ private void cmd_zoom() { - log.config("Activity=" + m_activity); + if (log.isLoggable(Level.CONFIG)) log.config("Activity=" + m_activity); if (m_activity == null) return; AEnv.zoom(m_activity.getAD_Table_ID(), m_activity.getRecord_ID()); @@ -659,7 +659,7 @@ public class WFActivity extends CPanel */ private void cmd_button() { - log.config("Activity=" + m_activity); + if (log.isLoggable(Level.CONFIG)) log.config("Activity=" + m_activity); if (m_activity == null) return; // @@ -705,7 +705,7 @@ public class WFActivity extends CPanel */ private void cmd_OK() { - log.config("Activity=" + m_activity); + if (log.isLoggable(Level.CONFIG)) log.config("Activity=" + m_activity); if (m_activity == null) return; int AD_User_ID = Env.getAD_User_ID(Env.getCtx()); @@ -721,7 +721,7 @@ public class WFActivity extends CPanel if (forward != null) { - log.config("Forward to " + forward); + if (log.isLoggable(Level.CONFIG)) log.config("Forward to " + forward); int fw = ((Integer)forward).intValue(); if (fw == AD_User_ID || fw == 0) { @@ -759,7 +759,7 @@ public class WFActivity extends CPanel return; } // - log.config("Answer=" + value + " - " + textMsg); + if (log.isLoggable(Level.CONFIG)) log.config("Answer=" + value + " - " + textMsg); try { m_activity.setUserChoice(AD_User_ID, value, dt, textMsg); @@ -776,7 +776,7 @@ public class WFActivity extends CPanel // User Action else { - log.config("Action=" + node.getAction() + " - " + textMsg); + if (log.isLoggable(Level.CONFIG)) log.config("Action=" + node.getAction() + " - " + textMsg); try { // ensure activity is ran within a transaction diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/GridController.java b/org.adempiere.ui.swing/src/org/compiere/grid/GridController.java index 4c37b8050d..335daad015 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/GridController.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/GridController.java @@ -264,7 +264,7 @@ public class GridController extends CPanel */ public void dispose() { - log.config( "(" + m_mTab.toString() + ")"); + if (log.isLoggable(Level.CONFIG)) log.config( "(" + m_mTab.toString() + ")"); // clear info stopEditor(false); if (m_mTab.isLoadComplete()) @@ -357,7 +357,7 @@ public class GridController extends CPanel public boolean initGrid (GridTab mTab, boolean onlyMultiRow, int WindowNo, APanel aPanel, GridWindow mWindow, boolean lazy) { - log.config( "(" + mTab.toString() + ")"); + if (log.isLoggable(Level.CONFIG)) log.config( "(" + mTab.toString() + ")"); m_mTab = mTab; m_WindowNo = WindowNo; m_onlyMultiRow = onlyMultiRow; @@ -654,7 +654,7 @@ public class GridController extends CPanel treeName = "AD_TreeCMM_ID"; } int AD_Tree_ID = Env.getContextAsInt (Env.getCtx(), m_WindowNo, treeName, true); - log.config(keyColumnName + " -> " + treeName + " = " + AD_Tree_ID); + if (log.isLoggable(Level.CONFIG)) log.config(keyColumnName + " -> " + treeName + " = " + AD_Tree_ID); if (AD_Tree_ID == 0) AD_Tree_ID = MTree.getDefaultAD_Tree_ID ( Env.getAD_Client_ID(Env.getCtx()), m_mTab.getKeyColumnName()); @@ -824,7 +824,7 @@ public class GridController extends CPanel // if (e.getChangedColumn() == 0) // return; int col = e.getChangedColumn(); - log.config("(" + m_mTab + ") Col=" + col + ": " + e.toString()); + if (log.isLoggable(Level.CONFIG)) log.config("(" + m_mTab + ") Col=" + col + ": " + e.toString()); // Process Callout GridField mField = m_mTab.getField(col); @@ -855,7 +855,7 @@ public class GridController extends CPanel // vTable.stopEditor(graphPanel); int rowTable = vTable.getSelectedRow(); int rowCurrent = m_mTab.getCurrentRow(); - log.config("(" + m_mTab.toString() + ") Row in Table=" + rowTable + ", in Model=" + rowCurrent); + if (log.isLoggable(Level.CONFIG)) log.config("(" + m_mTab.toString() + ") Row in Table=" + rowTable + ", in Model=" + rowCurrent); /* BT [ 1972495 ] Multirow Automatic New Record loses context // FR [ 1757088 ] if(rowCurrent + 1 == vTable.getRowCount() && !isSingleRow() && Env.isAutoNew(Env.getCtx()) && m_mTab.getRecord_ID() != -1) @@ -910,7 +910,7 @@ public class GridController extends CPanel Object value = e.getNewValue(); if (value == null) return; - log.config(e.getPropertyName() + "=" + value + if (log.isLoggable(Level.CONFIG)) log.config(e.getPropertyName() + "=" + value + " - " + value.getClass().toString()); if (!(value instanceof MTreeNode)) return; @@ -985,7 +985,7 @@ public class GridController extends CPanel GridField changedField = m_mTab.getField(col); String columnName = changedField.getColumnName(); ArrayList dependants = m_mTab.getDependantFields(columnName); - log.config("(" + m_mTab.toString() + ") " + if (log.isLoggable(Level.CONFIG)) log.config("(" + m_mTab.toString() + ") " + columnName + " - Dependents=" + dependants.size()); // No Dependents and no Callout - Set just Background if (dependants.size() == 0 && changedField.getCallout().length() > 0) @@ -1011,7 +1011,7 @@ public class GridController extends CPanel // complete single row re-display boolean noData = m_mTab.getRowCount() == 0; - log.config(m_mTab.toString() + " - Rows=" + m_mTab.getRowCount()); + if (log.isLoggable(Level.CONFIG)) log.config(m_mTab.toString() + " - Rows=" + m_mTab.getRowCount()); // All Components in vPanel (Single Row) Set hiddens = new HashSet(); @@ -1107,7 +1107,7 @@ public class GridController extends CPanel // - log.config(m_mTab.toString() + " - fini - " + if (log.isLoggable(Level.CONFIG)) log.config(m_mTab.toString() + " - fini - " + (col <= 0 ? "complete" : "seletive")); } // dynamicDisplay @@ -1199,17 +1199,17 @@ public class GridController extends CPanel { if (!((VEditor)source).isReadWrite()) { - log.config("(" + m_mTab.toString() + ") " + e.getPropertyName()); + if (log.isLoggable(Level.CONFIG)) log.config("(" + m_mTab.toString() + ") " + e.getPropertyName()); return; } } else { - log.config("(" + m_mTab.toString() + ") " + e.getPropertyName()); + if (log.isLoggable(Level.CONFIG)) log.config("(" + m_mTab.toString() + ") " + e.getPropertyName()); return; } } // processed - log.config("(" + m_mTab.toString() + ") " + if (log.isLoggable(Level.CONFIG)) log.config("(" + m_mTab.toString() + ") " + e.getPropertyName() + "=" + e.getNewValue() + " (" + e.getOldValue() + ") " + (e.getOldValue() == null ? "" : e.getOldValue().getClass().getName())); @@ -1369,7 +1369,7 @@ public class GridController extends CPanel */ public void stopEditor (boolean saveValue) { - log.config("(" + m_mTab.toString() + ") TableEditing=" + vTable.isEditing()); + if (log.isLoggable(Level.CONFIG)) log.config("(" + m_mTab.toString() + ") TableEditing=" + vTable.isEditing()); // MultiRow - remove editors vTable.stopEditor(saveValue); diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/VCreateFromDepositBatchUI.java b/org.adempiere.ui.swing/src/org/compiere/grid/VCreateFromDepositBatchUI.java index d4a765cfb9..492a144c60 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/VCreateFromDepositBatchUI.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/VCreateFromDepositBatchUI.java @@ -287,7 +287,7 @@ public class VCreateFromDepositBatchUI extends CreateFromDepositBatch implements */ public void actionPerformed(ActionEvent e) { - log.config("Action=" + e.getActionCommand()); + if (log.isLoggable(Level.CONFIG)) log.config("Action=" + e.getActionCommand()); // Object source = e.getSource(); if(e.getActionCommand().equals(ConfirmPanel.A_REFRESH)) { diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/VCreateFromInvoiceUI.java b/org.adempiere.ui.swing/src/org/compiere/grid/VCreateFromInvoiceUI.java index 4c03e88a3c..5a5624dc11 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/VCreateFromInvoiceUI.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/VCreateFromInvoiceUI.java @@ -181,12 +181,12 @@ public class VCreateFromInvoiceUI extends CreateFromInvoice implements ActionLis */ public void actionPerformed(ActionEvent e) { - log.config("Action=" + e.getActionCommand()); + if (log.isLoggable(Level.CONFIG)) log.config("Action=" + e.getActionCommand()); if (m_actionActive) return; m_actionActive = true; - log.config("Action=" + e.getActionCommand()); + if (log.isLoggable(Level.CONFIG)) log.config("Action=" + e.getActionCommand()); // Order if (e.getSource().equals(orderField)) { @@ -232,7 +232,7 @@ public class VCreateFromInvoiceUI extends CreateFromInvoice implements ActionLis */ public void vetoableChange (PropertyChangeEvent e) { - log.config(e.getPropertyName() + "=" + e.getNewValue()); + if (log.isLoggable(Level.CONFIG)) log.config(e.getPropertyName() + "=" + e.getNewValue()); // BPartner - load Order/Invoice/Shipment if (e.getPropertyName().equals("C_BPartner_ID")) @@ -269,7 +269,7 @@ public class VCreateFromInvoiceUI extends CreateFromInvoice implements ActionLis */ protected void initBPOrderDetails (int C_BPartner_ID, boolean forInvoice) { - log.config("C_BPartner_ID=" + C_BPartner_ID); + if (log.isLoggable(Level.CONFIG)) log.config("C_BPartner_ID=" + C_BPartner_ID); KeyNamePair pp = new KeyNamePair(0,""); // load PO Orders - Closed, Completed orderField.removeActionListener(this); @@ -299,7 +299,7 @@ public class VCreateFromInvoiceUI extends CreateFromInvoice implements ActionLis */ private void initBPShipmentDetails(int C_BPartner_ID) { - log.config("C_BPartner_ID" + C_BPartner_ID); + if (log.isLoggable(Level.CONFIG)) log.config("C_BPartner_ID" + C_BPartner_ID); // load Shipments (Receipts) - Completed, Closed shipmentField.removeActionListener(this); diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/VCreateFromRMAUI.java b/org.adempiere.ui.swing/src/org/compiere/grid/VCreateFromRMAUI.java index 2b44a2d540..63b1a5e642 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/VCreateFromRMAUI.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/VCreateFromRMAUI.java @@ -137,7 +137,7 @@ public class VCreateFromRMAUI extends CreateFromRMA implements VetoableChangeLis */ public void vetoableChange (PropertyChangeEvent e) { - log.config(e.getPropertyName() + "=" + e.getNewValue()); + if (log.isLoggable(Level.CONFIG)) log.config(e.getPropertyName() + "=" + e.getNewValue()); // BPartner - load Order/Invoice/Shipment if (e.getPropertyName().equals("C_BPartner_ID")) diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/VCreateFromShipmentUI.java b/org.adempiere.ui.swing/src/org/compiere/grid/VCreateFromShipmentUI.java index c88e94abf3..c5abd1e0f9 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/VCreateFromShipmentUI.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/VCreateFromShipmentUI.java @@ -223,12 +223,12 @@ public class VCreateFromShipmentUI extends CreateFromShipment implements ActionL */ public void actionPerformed(ActionEvent e) { - log.config("Action=" + e.getActionCommand()); + if (log.isLoggable(Level.CONFIG)) log.config("Action=" + e.getActionCommand()); if (m_actionActive) return; m_actionActive = true; - log.config("Action=" + e.getActionCommand()); + if (log.isLoggable(Level.CONFIG)) log.config("Action=" + e.getActionCommand()); // Order if (e.getSource().equals(orderField)) { @@ -283,7 +283,7 @@ public class VCreateFromShipmentUI extends CreateFromShipment implements ActionL */ public void vetoableChange (PropertyChangeEvent e) { - log.config(e.getPropertyName() + "=" + e.getNewValue()); + if (log.isLoggable(Level.CONFIG)) log.config(e.getPropertyName() + "=" + e.getNewValue()); // BPartner - load Order/Invoice/Shipment if (e.getPropertyName().equals("C_BPartner_ID")) @@ -320,7 +320,7 @@ public class VCreateFromShipmentUI extends CreateFromShipment implements ActionL */ protected void initBPOrderDetails (int C_BPartner_ID, boolean forInvoice) { - log.config("C_BPartner_ID=" + C_BPartner_ID); + if (log.isLoggable(Level.CONFIG)) log.config("C_BPartner_ID=" + C_BPartner_ID); KeyNamePair pp = new KeyNamePair(0,""); // load PO Orders - Closed, Completed orderField.removeActionListener(this); @@ -350,7 +350,7 @@ public class VCreateFromShipmentUI extends CreateFromShipment implements ActionL */ private void initBPInvoiceDetails(int C_BPartner_ID) { - log.config("C_BPartner_ID" + C_BPartner_ID); + if (log.isLoggable(Level.CONFIG)) log.config("C_BPartner_ID" + C_BPartner_ID); // load Shipments (Receipts) - Completed, Closed invoiceField.removeActionListener(this); diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/VCreateFromStatementUI.java b/org.adempiere.ui.swing/src/org/compiere/grid/VCreateFromStatementUI.java index c8bd0a8e71..1486f81772 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/VCreateFromStatementUI.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/VCreateFromStatementUI.java @@ -285,7 +285,7 @@ public class VCreateFromStatementUI extends CreateFromStatement implements Actio */ public void actionPerformed(ActionEvent e) { - log.config("Action=" + e.getActionCommand()); + if (log.isLoggable(Level.CONFIG)) log.config("Action=" + e.getActionCommand()); // Object source = e.getSource(); if(e.getActionCommand().equals(ConfirmPanel.A_REFRESH)) { diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormDirect.java b/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormDirect.java index 6689d3ab8d..7d08cc39f6 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormDirect.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormDirect.java @@ -19,6 +19,7 @@ import java.awt.Insets; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.util.ArrayList; +import java.util.logging.Level; import org.adempiere.plaf.AdempierePLAF; import org.compiere.apps.ADialog; @@ -124,7 +125,7 @@ public abstract class VPaymentFormDirect extends PaymentFormDirect implements Ac dataOK = false; } // - log.config("OK=" + dataOK); + if (log.isLoggable(Level.CONFIG)) log.config("OK=" + dataOK); return dataOK; } diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/VSortTab.java b/org.adempiere.ui.swing/src/org/compiere/grid/VSortTab.java index ed9e3c458a..981563afaa 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/VSortTab.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/VSortTab.java @@ -91,7 +91,7 @@ public class VSortTab extends CPanel implements APanelTab */ public VSortTab(int WindowNo, int AD_Table_ID, int AD_ColumnSortOrder_ID, int AD_ColumnSortYesNo_ID) { - log.config("SortOrder=" + AD_ColumnSortOrder_ID + ", SortYesNo=" + AD_ColumnSortYesNo_ID); + if (log.isLoggable(Level.CONFIG)) log.config("SortOrder=" + AD_ColumnSortOrder_ID + ", SortYesNo=" + AD_ColumnSortYesNo_ID); m_WindowNo = WindowNo; try diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/VTabbedPane.java b/org.adempiere.ui.swing/src/org/compiere/grid/VTabbedPane.java index 8c4bddfa12..aa38d8583f 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/VTabbedPane.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/VTabbedPane.java @@ -18,6 +18,7 @@ package org.compiere.grid; import java.awt.Component; import java.util.ArrayList; +import java.util.logging.Level; import javax.swing.Icon; import javax.swing.JTabbedPane; @@ -339,7 +340,7 @@ public class VTabbedPane extends CTabbedPane if (process) { - log.config(columnName == null ? "" : columnName); + if (log.isLoggable(Level.CONFIG)) log.config(columnName == null ? "" : columnName); for (int i = 0; i < components.size(); i++) { Component c = components.get(i); diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/VTable.java b/org.adempiere.ui.swing/src/org/compiere/grid/VTable.java index 1058a0d7da..32e68650cc 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/VTable.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/VTable.java @@ -20,6 +20,7 @@ import java.awt.Component; import java.awt.Rectangle; import java.beans.PropertyChangeEvent; import java.beans.PropertyChangeListener; +import java.util.logging.Level; import javax.swing.Action; import javax.swing.table.TableModel; @@ -100,13 +101,13 @@ public final class VTable extends CTable int selRow = getSelectedRow(); if (row == selRow) return; - log.config(GridTab.PROPERTY + "=" + row + " from " + selRow); + if (log.isLoggable(Level.CONFIG)) log.config(GridTab.PROPERTY + "=" + row + " from " + selRow); setRowSelectionInterval(row,row); setColumnSelectionInterval(0, 0); Rectangle cellRect = getCellRect(row, 0, false); if (cellRect != null) scrollRectToVisible(cellRect); - log.config(GridTab.PROPERTY + "=" + row + " from " + selRow); + if (log.isLoggable(Level.CONFIG)) log.config(GridTab.PROPERTY + "=" + row + " from " + selRow); } } // propertyChange @@ -152,7 +153,7 @@ public final class VTable extends CTable p_lastSortIndex = modelColumnIndex; // - log.config("#" + modelColumnIndex + if (log.isLoggable(Level.CONFIG)) log.config("#" + modelColumnIndex + " - rows=" + rows + ", asc=" + p_asc); ((GridTable)model).sort(modelColumnIndex, p_asc); diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/ed/MDocTime.java b/org.adempiere.ui.swing/src/org/compiere/grid/ed/MDocTime.java index 1dc4f1f5b6..bd9f7cc236 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/ed/MDocTime.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/ed/MDocTime.java @@ -80,7 +80,7 @@ public final class MDocTime extends PlainDocument // is it a digit ? if (!Character.isDigit(string.charAt(0))) { - log.config("No Digit=" + string); + if (log.isLoggable(Level.CONFIG)) log.config("No Digit=" + string); return; } @@ -100,24 +100,24 @@ public final class MDocTime extends PlainDocument } if (i < 0) { - log.config("Invalid value: " + i); + if (log.isLoggable(Level.CONFIG)) log.config("Invalid value: " + i); return; } // Minutes if (!m_isHour && i > 59) { - log.config("Invalid minute value: " + i); + if (log.isLoggable(Level.CONFIG)) log.config("Invalid minute value: " + i); return; } // Hour if (m_isHour && m_is12Hour && i > 12) { - log.config("Invalid 12 hour value: " + i); + if (log.isLoggable(Level.CONFIG)) log.config("Invalid 12 hour value: " + i); return; } if (m_isHour && !m_is12Hour && i > 24) { - log.config("Invalid 24 hour value: " + i); + if (log.isLoggable(Level.CONFIG)) log.config("Invalid 24 hour value: " + i); return; } // diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/ed/VAccountDialog.java b/org.adempiere.ui.swing/src/org/compiere/grid/ed/VAccountDialog.java index 94fe0fbb29..6a47efab4d 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/ed/VAccountDialog.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/ed/VAccountDialog.java @@ -118,7 +118,7 @@ public final class VAccountDialog extends CDialog MAccountLookup mAccount, int C_AcctSchema_ID) { super (frame, title, true); - log.config("C_AcctSchema_ID=" + C_AcctSchema_ID + if (log.isLoggable(Level.CONFIG)) log.config("C_AcctSchema_ID=" + C_AcctSchema_ID + ", C_ValidCombination_ID=" + mAccount.C_ValidCombination_ID); m_mAccount = mAccount; m_C_AcctSchema_ID = C_AcctSchema_ID; @@ -268,7 +268,7 @@ public final class VAccountDialog extends CDialog // Get AcctSchema Info if (s_AcctSchema == null || s_AcctSchema.getC_AcctSchema_ID() != m_C_AcctSchema_ID) s_AcctSchema = new MAcctSchema (Env.getCtx(), m_C_AcctSchema_ID, null); - log.config(s_AcctSchema.toString() + if (log.isLoggable(Level.CONFIG)) log.config(s_AcctSchema.toString() + ", #" + s_AcctSchema.getAcctSchemaElements().length); Env.setContext(Env.getCtx(), m_WindowNo, "C_AcctSchema_ID", m_C_AcctSchema_ID); @@ -614,7 +614,7 @@ public final class VAccountDialog extends CDialog int row = m_gridController.getTable().getSelectedRow(); if (row >= 0) m_C_ValidCombination_ID = ((Integer)m_mTab.getValue(row, "C_ValidCombination_ID")).intValue(); - log.config("(" + row + ") - " + m_C_ValidCombination_ID); + if (log.isLoggable(Level.CONFIG)) log.config("(" + row + ") - " + m_C_ValidCombination_ID); } } // saveSelection @@ -652,7 +652,7 @@ public final class VAccountDialog extends CDialog */ public void dataStatusChanged (DataStatusEvent e) { - log.config(e.toString()); + if (log.isLoggable(Level.CONFIG)) log.config(e.toString()); String info = (String)m_mTab.getValue("Description"); f_Description.setText (info); // @@ -1123,7 +1123,7 @@ public final class VAccountDialog extends CDialog */ public Integer getValue() { - log.config("C_ValidCombination_ID=" + m_C_ValidCombination_ID + ", Changed=" + m_changed); + if (log.isLoggable(Level.CONFIG)) log.config("C_ValidCombination_ID=" + m_C_ValidCombination_ID + ", Changed=" + m_changed); if (!m_changed || m_C_ValidCombination_ID == 0) return null; return new Integer(m_C_ValidCombination_ID); diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/ed/VAssignmentDialog.java b/org.adempiere.ui.swing/src/org/compiere/grid/ed/VAssignmentDialog.java index 6f249d7607..10d1791073 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/ed/VAssignmentDialog.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/ed/VAssignmentDialog.java @@ -92,7 +92,7 @@ public class VAssignmentDialog extends CDialog boolean allowZoom, boolean allowDelete) { super (frame, Msg.getMsg(Env.getCtx(), "VAssignmentDialog"), true); - log.config(mAssignment.toString()); + if (log.isLoggable(Level.CONFIG)) log.config(mAssignment.toString()); m_mAssignment = mAssignment; m_frame = frame; try diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/ed/VBPartner.java b/org.adempiere.ui.swing/src/org/compiere/grid/ed/VBPartner.java index d0354847ae..e64bf8d8d5 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/ed/VBPartner.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/ed/VBPartner.java @@ -287,7 +287,7 @@ public final class VBPartner extends CDialog implements ActionListener */ public boolean loadBPartner (int C_BPartner_ID) { - log.config("C_BPartner_ID=" + C_BPartner_ID); + if (log.isLoggable(Level.CONFIG)) log.config("C_BPartner_ID=" + C_BPartner_ID); // New bpartner if (C_BPartner_ID == 0) { diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/ed/VBinary.java b/org.adempiere.ui.swing/src/org/compiere/grid/ed/VBinary.java index e78c6fc3f9..ec41e2b2ab 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/ed/VBinary.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/ed/VBinary.java @@ -87,7 +87,7 @@ public class VBinary extends JButton */ public void setValue(Object value) { - log.config("=" + value); + if (log.isLoggable(Level.CONFIG)) log.config("=" + value); m_data = value; if (m_data == null) setText("-"); @@ -229,7 +229,7 @@ public class VBinary extends JButton os.write(buffer); os.flush(); os.close(); - log.config("Save to " + file + " #" + buffer.length); + if (log.isLoggable(Level.CONFIG)) log.config("Save to " + file + " #" + buffer.length); } else // load { @@ -242,7 +242,7 @@ public class VBinary extends JButton is.close(); byte[] data = os.toByteArray(); m_data = data; - log.config("Load from " + file + " #" + data.length); + if (log.isLoggable(Level.CONFIG)) log.config("Load from " + file + " #" + data.length); os.close(); } } diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/ed/VColor.java b/org.adempiere.ui.swing/src/org/compiere/grid/ed/VColor.java index bc717c3fc8..5ec9d7135f 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/ed/VColor.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/ed/VColor.java @@ -115,7 +115,7 @@ public class VColor extends CButton */ public void setValue (Object value) { - log.config("Value=" + value); + if (log.isLoggable(Level.CONFIG)) log.config("Value=" + value); m_value = value; m_cc = getAdempiereColor(); diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/ed/VDate.java b/org.adempiere.ui.swing/src/org/compiere/grid/ed/VDate.java index 94f157817b..994dfc7a9e 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/ed/VDate.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/ed/VDate.java @@ -526,7 +526,7 @@ public class VDate extends JComponent public static Timestamp startCalendar(Container jc, Timestamp value, SimpleDateFormat format, int displayType, String title) { - log.config("Date=" + value); + if (log.isLoggable(Level.CONFIG)) log.config("Date=" + value); // Find frame Frame frame = AEnv.getFrame(jc); @@ -534,7 +534,7 @@ public class VDate extends JComponent Calendar cal = new Calendar(frame, title, value, displayType); AEnv.showCenterWindow(frame, cal); Timestamp result = cal.getTimestamp(); - log.config( "Result=" + result); + if (log.isLoggable(Level.CONFIG)) log.config( "Result=" + result); if (result == null) result = value; // original else if (result.compareTo(new Timestamp(-1))==0) diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/ed/VDocAction.java b/org.adempiere.ui.swing/src/org/compiere/grid/ed/VDocAction.java index 12c8a4758b..6f2a4da790 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/ed/VDocAction.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/ed/VDocAction.java @@ -418,7 +418,7 @@ public class VDocAction extends CDialog return false; // Save Selection - log.config("DocAction=" + s_value[index]); + if (log.isLoggable(Level.CONFIG)) log.config("DocAction=" + s_value[index]); m_mTab.setValue("DocAction", s_value[index]); return true; } // save diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/ed/VLocation.java b/org.adempiere.ui.swing/src/org/compiere/grid/ed/VLocation.java index 55a21b8d5f..a45e7e5fe4 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/ed/VLocation.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/ed/VLocation.java @@ -352,7 +352,7 @@ public class VLocation extends JComponent if (e.getSource() == mDelete) m_value = null; // create new // - log.config( "actionPerformed - " + m_value); + if (log.isLoggable(Level.CONFIG)) log.config( "actionPerformed - " + m_value); VLocationDialog ld = new VLocationDialog(AEnv.getFrame(this), Msg.getMsg(Env.getCtx(), "Location"), m_value, m_GridField); ld.setVisible(true); diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/ed/VLocator.java b/org.adempiere.ui.swing/src/org/compiere/grid/ed/VLocator.java index 53e3c93937..42e541a32b 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/ed/VLocator.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/ed/VLocator.java @@ -392,7 +392,7 @@ public class VLocator extends JComponent // Warehouse/Product int only_Warehouse_ID = getOnly_Warehouse_ID(); int only_Product_ID = getOnly_Product_ID(); - log.config("Only Warehouse_ID=" + only_Warehouse_ID + if (log.isLoggable(Level.CONFIG)) log.config("Only Warehouse_ID=" + only_Warehouse_ID + ", Product_ID=" + only_Product_ID); // Text Entry ok diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/ed/VLocatorDialog.java b/org.adempiere.ui.swing/src/org/compiere/grid/ed/VLocatorDialog.java index 0b03cc564f..d0e6a253e0 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/ed/VLocatorDialog.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/ed/VLocatorDialog.java @@ -475,7 +475,7 @@ public class VLocatorDialog extends CDialog fLocator.setSelectedItem(loc); } // createNew // - log.config("M_Locator_ID=" + m_M_Locator_ID); + if (log.isLoggable(Level.CONFIG)) log.config("M_Locator_ID=" + m_M_Locator_ID); } // actionOK /** diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/ed/VLookup.java b/org.adempiere.ui.swing/src/org/compiere/grid/ed/VLookup.java index 4d05bc30f2..c96347ef90 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/ed/VLookup.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/ed/VLookup.java @@ -756,7 +756,7 @@ public class VLookup extends JComponent { if (m_settingValue || m_settingFocus || m_stopediting) return; - log.config(m_columnName + " - " + e.getActionCommand() + ", ComboValue=" + m_combo.getSelectedItem()); + if (log.isLoggable(Level.CONFIG)) log.config(m_columnName + " - " + e.getActionCommand() + ", ComboValue=" + m_combo.getSelectedItem()); // log.fine("Hash=" + this.hashCode()); // Preference @@ -926,7 +926,7 @@ public class VLookup extends JComponent // Result if (result != null && result.length > 0) { - log.config(m_columnName + " - Result = " + result.toString() + " (" + result.getClass().getName() + ")"); + if (log.isLoggable(Level.CONFIG)) log.config(m_columnName + " - Result = " + result.toString() + " (" + result.getClass().getName() + ")"); // make sure that value is in cache m_lookup.getDirect(result[0], false, true); if (info.isResetValue()) @@ -940,12 +940,12 @@ public class VLookup extends JComponent } else if (cancelled) { - log.config(m_columnName + " - Result = null (cancelled)"); + if (log.isLoggable(Level.CONFIG)) log.config(m_columnName + " - Result = null (cancelled)"); actionCombo(null); } else { - log.config(m_columnName + " - Result = null (not cancelled)"); + if (log.isLoggable(Level.CONFIG)) log.config(m_columnName + " - Result = null (not cancelled)"); setValue(m_value); // to re-display value } // @@ -1045,7 +1045,7 @@ public class VLookup extends JComponent return; } text = text.toUpperCase(); - log.config(m_columnName + " - " + text); + if (log.isLoggable(Level.CONFIG)) log.config(m_columnName + " - " + text); // Exact first PreparedStatement pstmt = null; @@ -1545,7 +1545,7 @@ public class VLookup extends JComponent m_settingFocus = true; // prevents actionPerformed // Object obj = m_lookup.getSelectedItem(); - log.config(m_columnName + if (log.isLoggable(Level.CONFIG)) log.config(m_columnName + " - Start Count=" + m_combo.getItemCount() + ", Selected=" + obj); // log.fine( "VLookupHash=" + this.hashCode()); boolean popupVisible = m_combo.isPopupVisible(); @@ -1556,11 +1556,11 @@ public class VLookup extends JComponent m_combo.hidePopup(); m_combo.showPopup(); } - log.config(m_columnName + if (log.isLoggable(Level.CONFIG)) log.config(m_columnName + " - Update Count=" + m_combo.getItemCount() + ", Selected=" + m_lookup.getSelectedItem()); m_lookup.setSelectedItem(obj); - log.config(m_columnName - + " - Selected Count=" + m_combo.getItemCount() + ", Selected=" + m_lookup.getSelectedItem()); + if (log.isLoggable(Level.CONFIG)) log.config(m_columnName + + " - Selected Count=" + m_combo.getItemCount() + ", Selected=" + m_lookup.getSelectedItem()); // m_settingFocus = false; } // focusGained @@ -1580,7 +1580,7 @@ public class VLookup extends JComponent if (e.getSource() == m_text) { String text = m_text.getText(); - log.config(m_columnName + " (Text) " + m_columnName + " = " + m_value + " - " + text); + if (log.isLoggable(Level.CONFIG)) log.config(m_columnName + " (Text) " + m_columnName + " = " + m_value + " - " + text); m_haveFocus = false; // Skip if empty if ((m_value == null @@ -1603,7 +1603,7 @@ public class VLookup extends JComponent // m_settingFocus = true; // prevents actionPerformed // - log.config(m_columnName + " = " + m_combo.getSelectedItem()); + if (log.isLoggable(Level.CONFIG)) log.config(m_columnName + " = " + m_combo.getSelectedItem()); Object obj = m_combo.getSelectedItem(); /* // set original model diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/ed/VMemo.java b/org.adempiere.ui.swing/src/org/compiere/grid/ed/VMemo.java index edb5759336..f492f6af45 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/ed/VMemo.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/ed/VMemo.java @@ -28,6 +28,7 @@ import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; import java.beans.PropertyChangeEvent; import java.beans.PropertyVetoException; +import java.util.logging.Level; import javax.swing.InputVerifier; import javax.swing.JComponent; @@ -254,7 +255,7 @@ public class VMemo extends CTextArea */ public void focusGained (FocusEvent e) { - log.config(e.paramString()); + if (log.isLoggable(Level.CONFIG)) log.config(e.paramString()); if (e.getSource() instanceof VMemo) requestFocus(); else diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/ed/VNumber.java b/org.adempiere.ui.swing/src/org/compiere/grid/ed/VNumber.java index 3b5a957643..e78957cbc6 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/ed/VNumber.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/ed/VNumber.java @@ -546,7 +546,7 @@ public final class VNumber extends JComponent */ public void actionPerformed (ActionEvent e) { - log.config(e.getActionCommand()); + if (log.isLoggable(Level.CONFIG)) log.config(e.getActionCommand()); if (ValuePreference.NAME.equals(e.getActionCommand())) { if (MRole.getDefault().isShowPreference() && !m_mField.isEncrypted() && !m_mField.isEncryptedColumn()) @@ -716,7 +716,7 @@ public final class VNumber extends JComponent public static String startCalculator(Container jc, String value, DecimalFormat format, int displayType, String title, char operator) { - log.config("Value=" + value); + if (log.isLoggable(Level.CONFIG)) log.config("Value=" + value); BigDecimal startValue = new BigDecimal(0.0); try { @@ -740,7 +740,7 @@ public final class VNumber extends JComponent calc.handleInput(operator); AEnv.showCenterWindow(frame, calc); BigDecimal result = calc.getNumber(); - log.config( "Result=" + result); + if (log.isLoggable(Level.CONFIG)) log.config( "Result=" + result); // calc = null; if (result != null) diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/ed/VPAttribute.java b/org.adempiere.ui.swing/src/org/compiere/grid/ed/VPAttribute.java index e57bd018dd..294e32fc65 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/ed/VPAttribute.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/ed/VPAttribute.java @@ -396,7 +396,7 @@ public class VPAttribute extends JComponent } int M_Locator_ID = -1; - log.config("M_Product_ID=" + M_Product_ID + "/" + M_ProductBOM_ID + if (log.isLoggable(Level.CONFIG)) log.config("M_Product_ID=" + M_Product_ID + "/" + M_ProductBOM_ID + ",M_AttributeSetInstance_ID=" + M_AttributeSetInstance_ID + ", AD_Column_ID=" + m_AD_Column_ID); diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/ed/VPAttributeDialog.java b/org.adempiere.ui.swing/src/org/compiere/grid/ed/VPAttributeDialog.java index f406343d22..b727107eb1 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/ed/VPAttributeDialog.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/ed/VPAttributeDialog.java @@ -132,7 +132,7 @@ public class VPAttributeDialog extends CDialog boolean productWindow, int AD_Column_ID, int WindowNo) { super (frame, Msg.translate(Env.getCtx(), "M_AttributeSetInstance_ID") , true); - log.config("M_AttributeSetInstance_ID=" + M_AttributeSetInstance_ID + if (log.isLoggable(Level.CONFIG)) log.config("M_AttributeSetInstance_ID=" + M_AttributeSetInstance_ID + ", M_Product_ID=" + M_Product_ID + ", C_BPartner_ID=" + C_BPartner_ID + ", ProductW=" + productWindow + ", Column=" + AD_Column_ID); @@ -652,7 +652,7 @@ public class VPAttributeDialog extends CDialog private void cmd_newEdit() { boolean rw = cbNewEdit.isSelected(); - log.config("R/W=" + rw + " " + m_masi); + if (log.isLoggable(Level.CONFIG)) log.config("R/W=" + rw + " " + m_masi); // fieldLotString.setEditable(rw && m_masi.getM_Lot_ID()==0); if (fieldLot != null) diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/ed/VPaymentEditor.java b/org.adempiere.ui.swing/src/org/compiere/grid/ed/VPaymentEditor.java index 842d2a073a..25713c1e9d 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/ed/VPaymentEditor.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/ed/VPaymentEditor.java @@ -350,7 +350,7 @@ public class VPaymentEditor extends JComponent implements VEditor, ActionListene public void actionPerformed(ActionEvent e) { if (m_settingValue || m_settingFocus || m_stopediting) return; - log.config(m_columnName + " - " + e.getActionCommand() + ", ComboValue=" + m_combo.getSelectedItem()); + if (log.isLoggable(Level.CONFIG)) log.config(m_columnName + " - " + e.getActionCommand() + ", ComboValue=" + m_combo.getSelectedItem()); // Combo Selection if (e.getSource() == m_combo) @@ -468,7 +468,7 @@ public class VPaymentEditor extends JComponent implements VEditor, ActionListene m_settingFocus = true; // prevents actionPerformed // Object obj = m_lookup.getSelectedItem(); - log.config(m_columnName + if (log.isLoggable(Level.CONFIG)) log.config(m_columnName + " - Start Count=" + m_combo.getItemCount() + ", Selected=" + obj); // log.fine( "VLookupHash=" + this.hashCode()); boolean popupVisible = m_combo.isPopupVisible(); @@ -479,10 +479,10 @@ public class VPaymentEditor extends JComponent implements VEditor, ActionListene m_combo.hidePopup(); m_combo.showPopup(); } - log.config(m_columnName + if (log.isLoggable(Level.CONFIG))log.config(m_columnName + " - Update Count=" + m_combo.getItemCount() + ", Selected=" + m_lookup.getSelectedItem()); m_lookup.setSelectedItem(obj); - log.config(m_columnName + if (log.isLoggable(Level.CONFIG))log.config(m_columnName + " - Selected Count=" + m_combo.getItemCount() + ", Selected=" + m_lookup.getSelectedItem()); // m_settingFocus = false; @@ -506,7 +506,7 @@ public class VPaymentEditor extends JComponent implements VEditor, ActionListene // m_settingFocus = true; // prevents actionPerformed // - log.config(m_columnName + " = " + m_combo.getSelectedItem()); + if (log.isLoggable(Level.CONFIG)) log.config(m_columnName + " = " + m_combo.getSelectedItem()); Object obj = m_combo.getSelectedItem(); /* // set original model diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/ed/ValuePreference.java b/org.adempiere.ui.swing/src/org/compiere/grid/ed/ValuePreference.java index 4dbe3e435a..fe5764a959 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/ed/ValuePreference.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/ed/ValuePreference.java @@ -188,7 +188,7 @@ public class ValuePreference extends CDialog int displayType, int AD_Reference_ID) { super(frame, Msg.getMsg(Env.getCtx(), NAME) + " " + DisplayAttribute, true); - log.config("WindowNo=" + WindowNo + if (log.isLoggable(Level.CONFIG)) log.config("WindowNo=" + WindowNo + ", Client_ID=" + AD_Client_ID + ", Org_ID=" + AD_Org_ID + ", User_ID=" + AD_User_ID + ", Window_ID=" + AD_Window_ID + ", Attribute=" + Attribute + "/" + DisplayAttribute + ", Value=" + Value + "/" + DisplayValue + ", DisplayType=" + displayType + ", Reference_ID=" + AD_Reference_ID); diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/tree/VTreePanel.java b/org.adempiere.ui.swing/src/org/compiere/grid/tree/VTreePanel.java index 576006c4cb..14809ca0ad 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/tree/VTreePanel.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/tree/VTreePanel.java @@ -192,7 +192,7 @@ public final class VTreePanel extends CPanel { super(); toolbar = new ArrayList(); - log.config("Bar=" + hasBar + ", Editable=" + editable); + if (log.isLoggable(Level.CONFIG)) log.config("Bar=" + hasBar + ", Editable=" + editable); m_WindowNo = WindowNo; m_hasBar = hasBar; m_editable = editable; @@ -243,7 +243,7 @@ public final class VTreePanel extends CPanel */ public boolean initTree (int AD_Tree_ID) { - log.config("AD_Tree_ID=" + AD_Tree_ID); + if (log.isLoggable(Level.CONFIG)) log.config("AD_Tree_ID=" + AD_Tree_ID); // m_AD_Tree_ID = AD_Tree_ID; @@ -253,7 +253,7 @@ public final class VTreePanel extends CPanel m_root.setName(Msg.getMsg(Env.getCtx(), vTree.getName() ) ); // translate name of menu. // m_root.setName(Msg.getMsg(Env.getCtx(), "Menu") ); // @Trifon; this is the hardcoded way. - log.config("root=" + m_root); + if (log.isLoggable(Level.CONFIG)) log.config("root=" + m_root); m_nodeTableName = vTree.getNodeTableName(); treeModel = new AdempiereTreeModel(m_root, true); treeModel.setMTree(vTree); @@ -649,7 +649,7 @@ public final class VTreePanel extends CPanel */ public boolean setSelectedNode (int nodeID) { - log.config("ID=" + nodeID); + if (log.isLoggable(Level.CONFIG)) log.config("ID=" + nodeID); if (nodeID != -1) // new is -1 return selectID(nodeID, true); // show selection return false; @@ -665,14 +665,14 @@ public final class VTreePanel extends CPanel { if (m_root == null) return false; - log.config("NodeID=" + nodeID + if (log.isLoggable(Level.CONFIG)) log.config("NodeID=" + nodeID + ", Show=" + show + ", root=" + m_root); // try to find the node MTreeNode node = m_root.findNode (nodeID); if (node != null) { TreePath treePath = new TreePath(node.getPath()); - log.config("Node=" + node + if (log.isLoggable(Level.CONFIG)) log.config("Node=" + node + ", Path=" + treePath.toString()); tree.setSelectionPath(treePath); if (show) @@ -693,7 +693,7 @@ public final class VTreePanel extends CPanel */ private void setSelectedNode (MTreeNode nd) { - log.config("Node = " + nd); + if (log.isLoggable(Level.CONFIG)) log.config("Node = " + nd); m_selectedNode = nd; // firePropertyChange(NODE_SELECTION, null, nd); @@ -713,7 +713,7 @@ public final class VTreePanel extends CPanel public void nodeChanged (boolean save, int keyID, String name, String description, boolean isSummary, String imageIndicator) { - log.config("Save=" + save + ", KeyID=" + keyID + if (log.isLoggable(Level.CONFIG)) log.config("Save=" + save + ", KeyID=" + keyID + ", Name=" + name + ", Description=" + description + ", IsSummary=" + isSummary + ", ImageInd=" + imageIndicator + ", root=" + m_root); diff --git a/org.adempiere.ui.swing/src/org/compiere/minigrid/MiniTable.java b/org.adempiere.ui.swing/src/org/compiere/minigrid/MiniTable.java index 545255cb8b..12de77a558 100644 --- a/org.adempiere.ui.swing/src/org/compiere/minigrid/MiniTable.java +++ b/org.adempiere.ui.swing/src/org/compiere/minigrid/MiniTable.java @@ -547,7 +547,7 @@ public class MiniTable extends CTable implements IMiniTable if(getShowTotals()) addTotals(m_layout); autoSize(); - log.config("Row(rs)=" + getRowCount()); + if (log.isLoggable(Level.CONFIG)) log.config("Row(rs)=" + getRowCount()); } // loadTable @@ -589,7 +589,7 @@ public class MiniTable extends CTable implements IMiniTable if(getShowTotals()) addTotals(m_layout); autoSize(); - log.config("Row(array)=" + getRowCount()); + if (log.isLoggable(Level.CONFIG)) log.config("Row(array)=" + getRowCount()); } // loadTable diff --git a/org.adempiere.ui.swing/src/org/compiere/plaf/CompiereUtils.java b/org.adempiere.ui.swing/src/org/compiere/plaf/CompiereUtils.java index e288a1f77d..5390386f97 100644 --- a/org.adempiere.ui.swing/src/org/compiere/plaf/CompiereUtils.java +++ b/org.adempiere.ui.swing/src/org/compiere/plaf/CompiereUtils.java @@ -32,6 +32,7 @@ import java.awt.image.BufferedImage; import java.io.File; import java.net.MalformedURLException; import java.net.URL; +import java.util.logging.Level; import java.util.logging.Logger; import javax.imageio.ImageIO; @@ -428,7 +429,7 @@ public class CompiereUtils } if (image != null) { - log.config("Image type : " + image.getType()); + if (log.isLoggable(Level.CONFIG)) log.config("Image type : " + image.getType()); if (image.getWidth() <= 0 || image.getHeight() <= 0) { log.severe("URL: " + url + " =0"); diff --git a/org.adempiere.ui.swing/src/org/compiere/pos/PosBasePanel.java b/org.adempiere.ui.swing/src/org/compiere/pos/PosBasePanel.java index d422737b70..c6bb008bc4 100644 --- a/org.adempiere.ui.swing/src/org/compiere/pos/PosBasePanel.java +++ b/org.adempiere.ui.swing/src/org/compiere/pos/PosBasePanel.java @@ -145,7 +145,7 @@ public class PosBasePanel extends CPanel { log.log(Level.SEVERE, "init", e); } - log.config( "PosPanel.init - " + getPreferredSize()); + if (log.isLoggable(Level.CONFIG)) log.config( "PosPanel.init - " + getPreferredSize()); if ( p_pos.getAutoLogoutDelay() > 0 && logoutTimer == null ) { diff --git a/org.adempiere.ui.swing/src/org/compiere/print/AReport.java b/org.adempiere.ui.swing/src/org/compiere/print/AReport.java index 846d6b2eae..a187425eda 100644 --- a/org.adempiere.ui.swing/src/org/compiere/print/AReport.java +++ b/org.adempiere.ui.swing/src/org/compiere/print/AReport.java @@ -75,7 +75,7 @@ public class AReport implements ActionListener */ public AReport (int AD_Table_ID, JComponent invoker, MQuery query, IProcessUI parent, int WindowNo) { - log.config("AD_Table_ID=" + AD_Table_ID + " " + query); + if (log.isLoggable(Level.CONFIG)) log.config("AD_Table_ID=" + AD_Table_ID + " " + query); if (!MRole.getDefault().isCanReport(AD_Table_ID)) { ADialog.error(0, invoker, "AccessCannotReport", query.getTableName()); @@ -102,7 +102,7 @@ public class AReport implements ActionListener */ public AReport (int AD_Table_ID, JComponent invoker, MQuery query, IProcessUI parent, int WindowNo, String whereExtended) { - log.config("AD_Table_ID=" + AD_Table_ID + " " + query); + if (log.isLoggable(Level.CONFIG)) log.config("AD_Table_ID=" + AD_Table_ID + " " + query); if (!MRole.getDefault().isCanReport(AD_Table_ID)) { ADialog.error(0, invoker, "AccessCannotReport", query.getTableName()); diff --git a/org.adempiere.ui.swing/src/org/compiere/print/View.java b/org.adempiere.ui.swing/src/org/compiere/print/View.java index b6cd7c1634..1650c11a3d 100644 --- a/org.adempiere.ui.swing/src/org/compiere/print/View.java +++ b/org.adempiere.ui.swing/src/org/compiere/print/View.java @@ -23,6 +23,7 @@ import java.awt.Graphics2D; import java.awt.Point; import java.awt.Rectangle; import java.util.HashMap; +import java.util.logging.Level; import org.compiere.model.MQuery; import org.compiere.print.layout.LayoutEngine; @@ -311,7 +312,7 @@ public class View extends CPanel ); Page page = (Page)m_layout.getPages().get(pageNo-1); // - log.config("Relative=" + relativePoint + ", " + page); + if (log.isLoggable(Level.CONFIG)) log.config("Relative=" + relativePoint + ", " + page); // log.config("AbsolutePoint=" + absolutePoint + ", PageNo=" + pageNo + ", pageRectangle=" + pageRectangle); MQuery retValue = page.getDrillDown (relativePoint); if (retValue == null) @@ -334,7 +335,7 @@ public class View extends CPanel ); Page page = (Page)m_layout.getPages().get(pageNo-1); // - log.config("Relative=" + relativePoint + ", " + page); + if (log.isLoggable(Level.CONFIG)) log.config("Relative=" + relativePoint + ", " + page); // log.config("AbsolutePoint=" + absolutePoint + ", PageNo=" + pageNo + ", pageRectangle=" + pageRectangle); return page.getDrillAcross (relativePoint); } // getDrillAcross diff --git a/org.adempiere.ui.swing/src/org/compiere/print/Viewer.java b/org.adempiere.ui.swing/src/org/compiere/print/Viewer.java index 2f147d2184..3df0345101 100644 --- a/org.adempiere.ui.swing/src/org/compiere/print/Viewer.java +++ b/org.adempiere.ui.swing/src/org/compiere/print/Viewer.java @@ -1019,7 +1019,7 @@ public class Viewer extends CFrame return; } ext = ext.substring(ext.lastIndexOf('.')+1).toLowerCase(); - log.config( "File=" + outFile.getPath() + "; Type=" + ext); + if (log.isLoggable(Level.CONFIG)) log.config( "File=" + outFile.getPath() + "; Type=" + ext); setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); try { @@ -1306,7 +1306,7 @@ public class Viewer extends CFrame pp = (ValueNamePair)list.get(choice); String AD_Language = pp.getValue(); int AD_PrintFormat_ID = m_reportEngine.getPrintFormat().get_ID(); - log.config(AD_Language + " - AD_PrintFormat_ID=" + AD_PrintFormat_ID); + if (log.isLoggable(Level.CONFIG)) log.config(AD_Language + " - AD_PrintFormat_ID=" + AD_PrintFormat_ID); StringBuilder sb = new StringBuilder(); // English if (Language.isBaseLanguage (AD_Language)) @@ -1336,7 +1336,7 @@ public class Viewer extends CFrame " AND e.AD_Element_ID=c.AD_Element_ID AND c.AD_Column_ID=pfi.AD_Column_ID)"); } int count = DB.executeUpdate(sb.toString(), null); - log.config("Count=" + count); + if (log.isLoggable(Level.CONFIG)) log.config("Count=" + count); // m_reportEngine.setPrintFormat(MPrintFormat.get (Env.getCtx(), AD_PrintFormat_ID, true)); revalidate(); diff --git a/org.adempiere.ui.swing/src/org/compiere/report/core/ResultTable.java b/org.adempiere.ui.swing/src/org/compiere/report/core/ResultTable.java index 4d8dbea96a..fd93b8c255 100644 --- a/org.adempiere.ui.swing/src/org/compiere/report/core/ResultTable.java +++ b/org.adempiere.ui.swing/src/org/compiere/report/core/ResultTable.java @@ -96,7 +96,7 @@ public class ResultTable extends JTable implements MouseListener */ public void setModel (RModel reportModel) { - log.config(reportModel.toString()); + if (log.isLoggable(Level.CONFIG)) log.config(reportModel.toString()); m_model = reportModel; super.setModel(new ResultTableModel(reportModel)); // @@ -244,7 +244,7 @@ public class ResultTable extends JTable implements MouseListener m_lastSortIndex = modelColumnIndex; // - log.config("#" + modelColumnIndex + if (log.isLoggable(Level.CONFIG)) log.config("#" + modelColumnIndex + " - rows=" + rows + ", asc=" + m_asc); ResultTableModel model = (ResultTableModel)getModel(); diff --git a/org.adempiere.ui.swing/src/org/compiere/swing/CTable.java b/org.adempiere.ui.swing/src/org/compiere/swing/CTable.java index 6c703a5f3d..1d8103e56d 100644 --- a/org.adempiere.ui.swing/src/org/compiere/swing/CTable.java +++ b/org.adempiere.ui.swing/src/org/compiere/swing/CTable.java @@ -331,7 +331,7 @@ public class CTable extends JTable p_asc = !p_asc; p_lastSortIndex = modelColumnIndex; // - log.config("#" + modelColumnIndex + " - rows=" + rows + ", asc=" + p_asc); + if (log.isLoggable(Level.CONFIG)) log.config("#" + modelColumnIndex + " - rows=" + rows + ", asc=" + p_asc); // Selection Object selected = null; diff --git a/org.adempiere.ui.swing/src/org/compiere/swing/ColorBlind.java b/org.adempiere.ui.swing/src/org/compiere/swing/ColorBlind.java index e8c6ad7f3b..0eb244ae2a 100644 --- a/org.adempiere.ui.swing/src/org/compiere/swing/ColorBlind.java +++ b/org.adempiere.ui.swing/src/org/compiere/swing/ColorBlind.java @@ -17,6 +17,7 @@ package org.compiere.swing; import java.awt.Color; +import java.util.logging.Level; import java.util.logging.Logger; import javax.swing.plaf.ColorUIResource; @@ -89,7 +90,7 @@ public class ColorBlind else s_colorType = 0; if (s_colorType != 0) - log.config(COLORBLIND_TYPE[colorType]); + if (log.isLoggable(Level.CONFIG)) log.config(COLORBLIND_TYPE[colorType]); } // setColorType /** diff --git a/org.adempiere.ui.swing/src/org/compiere/swing/ThemeUtils.java b/org.adempiere.ui.swing/src/org/compiere/swing/ThemeUtils.java index 9aeb767256..fac8b60144 100644 --- a/org.adempiere.ui.swing/src/org/compiere/swing/ThemeUtils.java +++ b/org.adempiere.ui.swing/src/org/compiere/swing/ThemeUtils.java @@ -6,6 +6,7 @@ import java.awt.SystemColor; import java.util.HashMap; import java.util.Map; import java.util.Properties; +import java.util.logging.Level; import java.util.logging.Logger; import javax.swing.plaf.ColorUIResource; @@ -75,7 +76,7 @@ public final class ThemeUtils { } catch (Exception e) { - log.config(information + " - cannot parse: " + e.toString()); + if (log.isLoggable(Level.CONFIG)) log.config(information + " - cannot parse: " + e.toString()); } return stdColor; } // parseColor @@ -114,7 +115,7 @@ public final class ThemeUtils { } catch (Exception e) { - log.config(information + " - cannot parse: " + e.toString()); + if (log.isLoggable(Level.CONFIG)) log.config(information + " - cannot parse: " + e.toString()); } return stdFont; } // parseFont @@ -147,7 +148,7 @@ public final class ThemeUtils { */ public static void save (Properties properties, MetalTheme theme) { - log.config(CompiereColor.getDefaultBackground().toString()); + if (log.isLoggable(Level.CONFIG)) log.config(CompiereColor.getDefaultBackground().toString()); // properties.setProperty(P_Primary1, getColorAsString(theme.getPrimaryControlDarkShadow())); properties.setProperty(P_Primary2, getColorAsString(theme.getPrimaryControlShadow())); diff --git a/org.adempiere.ui.swing/src/org/eevolution/form/VInOutInvoiceGen.java b/org.adempiere.ui.swing/src/org/eevolution/form/VInOutInvoiceGen.java index d48cad27f5..caa13391cc 100755 --- a/org.adempiere.ui.swing/src/org/eevolution/form/VInOutInvoiceGen.java +++ b/org.adempiere.ui.swing/src/org/eevolution/form/VInOutInvoiceGen.java @@ -516,7 +516,7 @@ public class VInOutInvoiceGen extends CPanel if (results.size() == 0) return; - log.config("Selected #" + results.size()); + if (log.isLoggable(Level.CONFIG)) log.config("Selected #" + results.size()); selection = results; } // saveSelection @@ -660,7 +660,7 @@ public class VInOutInvoiceGen extends CPanel int[] ids = pi.getIDs(); if (ids == null || ids.length == 0) return; - log.config("PrintItems=" + ids.length); + if (log.isLoggable(Level.CONFIG)) log.config("PrintItems=" + ids.length); confirmPanelGen.getOKButton().setEnabled(false); // OK to print shipments diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/ValuePreference.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/ValuePreference.java index 7c2e238abf..4d9268df66 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/ValuePreference.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/ValuePreference.java @@ -189,7 +189,7 @@ public class ValuePreference extends Window implements EventListener super(); this.setTitle(Msg.getMsg(Env.getCtx(), NAME) + " " + DisplayAttribute); - log.config("WindowNo=" + WindowNo + if (log.isLoggable(Level.CONFIG)) log.config("WindowNo=" + WindowNo + ", Client_ID=" + AD_Client_ID + ", Org_ID=" + AD_Org_ID + ", User_ID=" + AD_User_ID + ", Window_ID=" + AD_Window_ID + ", Attribute=" + Attribute + "/" + DisplayAttribute + ", Value=" + Value + "/" + DisplayValue + ", DisplayType=" + displayType + ", Reference_ID=" + AD_Reference_ID); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/WArchive.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/WArchive.java index b154f4f5cd..d7e3be8559 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/WArchive.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/WArchive.java @@ -38,7 +38,7 @@ public class WArchive implements EventListener */ public WArchive (Component invoker, int AD_Table_ID, int Record_ID) { - log.config("AD_Table_ID=" + AD_Table_ID + ", Record_ID=" + Record_ID); + if (log.isLoggable(Level.CONFIG)) log.config("AD_Table_ID=" + AD_Table_ID + ", Record_ID=" + Record_ID); m_AD_Table_ID = AD_Table_ID; m_Record_ID = Record_ID; getArchives(invoker); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/WRequest.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/WRequest.java index 75ef08fa81..38247f38da 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/WRequest.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/WRequest.java @@ -69,7 +69,7 @@ public class WRequest implements EventListener */ public WRequest (Component invoker, int AD_Table_ID, int Record_ID, int C_BPartner_ID) { - log.config("AD_Table_ID=" + AD_Table_ID + ", Record_ID=" + Record_ID); + if (log.isLoggable(Level.CONFIG)) log.config("AD_Table_ID=" + AD_Table_ID + ", Record_ID=" + Record_ID); m_AD_Table_ID = AD_Table_ID; m_Record_ID = Record_ID; m_C_BPartner_ID = C_BPartner_ID; diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/WZoomAcross.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/WZoomAcross.java index cb76b40278..a813f5159a 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/WZoomAcross.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/WZoomAcross.java @@ -18,6 +18,7 @@ package org.adempiere.webui; import java.util.ArrayList; import java.util.List; +import java.util.logging.Level; import org.adempiere.model.ZoomInfoFactory; import org.adempiere.webui.apps.AEnv; @@ -64,7 +65,7 @@ public class WZoomAcross public WZoomAcross(Component invoker, PO po, final int windowID) { - log.config("PO=" + po+", WindowID="+windowID); + if (log.isLoggable(Level.CONFIG)) log.config("PO=" + po+", WindowID="+windowID); mkZoomTargets(po, windowID); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/acct/WAcctViewer.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/acct/WAcctViewer.java index 2b5754a04c..fd944102da 100755 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/acct/WAcctViewer.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/acct/WAcctViewer.java @@ -1009,7 +1009,7 @@ public class WAcctViewer extends Window implements EventListener bQuery.setEnabled(false); statusLine.setValue(" " + Msg.getMsg(Env.getCtx(), "Processing")); - log.config(para.toString()); + if (log.isLoggable(Level.CONFIG)) log.config(para.toString()); // Switch to Result pane @@ -1139,7 +1139,7 @@ public class WAcctViewer extends Window implements EventListener return; m_data.AD_Table_ID = ((Integer)m_data.tableInfo.get(vp.getValue())).intValue(); - log.config(vp.getValue() + " = " + m_data.AD_Table_ID); + if (log.isLoggable(Level.CONFIG)) log.config(vp.getValue() + " = " + m_data.AD_Table_ID); // Reset Record @@ -1241,7 +1241,7 @@ public class WAcctViewer extends Window implements EventListener // Save for query - log.config(keyColumn + " - " + key); + if (log.isLoggable(Level.CONFIG)) log.config(keyColumn + " - " + key); if (button == selRecord) // Record_ID m_data.Record_ID = key.intValue(); else diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADSortTab.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADSortTab.java index 8bd7778d2b..9e7c6f8e48 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADSortTab.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADSortTab.java @@ -83,7 +83,7 @@ public class ADSortTab extends Panel implements IADTabpanel */ public ADSortTab(int WindowNo, GridTab gridTab) { - log.config("SortOrder=" + gridTab.getAD_ColumnSortOrder_ID() + ", SortYesNo=" + gridTab.getAD_ColumnSortYesNo_ID()); + if (log.isLoggable(Level.CONFIG)) log.config("SortOrder=" + gridTab.getAD_ColumnSortOrder_ID() + ", SortYesNo=" + gridTab.getAD_ColumnSortYesNo_ID()); m_WindowNo = WindowNo; this.gridTab = gridTab; diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADWindowToolbar.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADWindowToolbar.java index d6304af109..408b6c8dc7 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADWindowToolbar.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADWindowToolbar.java @@ -578,8 +578,7 @@ public class ADWindowToolbar extends FToolbar implements EventListener X_AD_ToolBarButton tbt = new X_AD_ToolBarButton(m_ctx, ToolBarButton_ID, null); String restrictName = BTNPREFIX + tbt.getComponentName(); - if (log.isLoggable(Level.CONFIG)) - log.config("tbt="+tbt.getAD_ToolBarButton_ID() + " / " + restrictName); + if (log.isLoggable(Level.CONFIG)) log.config("tbt="+tbt.getAD_ToolBarButton_ID() + " / " + restrictName); for (Component p = this.getFirstChild(); p != null; p = p.getNextSibling()) { if (p instanceof ToolBarButton) { diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/AEnv.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/AEnv.java index ed26e11277..4673e74bc4 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/AEnv.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/AEnv.java @@ -195,7 +195,7 @@ public final class AEnv AD_Window_ID = PO_Window_ID; } - log.config(TableName + " - Record_ID=" + Record_ID + " (IsSOTrx=" + isSOTrx + ")"); + if (log.isLoggable(Level.CONFIG)) log.config(TableName + " - Record_ID=" + Record_ID + " (IsSOTrx=" + isSOTrx + ")"); zoom(AD_Window_ID, MQuery.getEqualQuery(TableName + "_ID", Record_ID)); } // zoom @@ -266,7 +266,7 @@ public final class AEnv public static GridWindowVO getMWindowVO (int WindowNo, int AD_Window_ID, int AD_Menu_ID) { - log.config("Window=" + WindowNo + ", AD_Window_ID=" + AD_Window_ID); + if (log.isLoggable(Level.CONFIG)) log.config("Window=" + WindowNo + ", AD_Window_ID=" + AD_Window_ID); GridWindowVO mWindowVO = null; String sessionID = Env.getContext(Env.getCtx(), "#AD_Session_ID"); if (AD_Window_ID != 0 && Ini.isCacheWindow()) // try cache @@ -363,7 +363,7 @@ public final class AEnv public static void cacheReset (String tableName, int Record_ID) { - log.config("TableName=" + tableName + ", Record_ID=" + Record_ID); + if (log.isLoggable(Level.CONFIG)) log.config("TableName=" + tableName + ", Record_ID=" + Record_ID); CacheMgt.get().reset(tableName, Record_ID); } // cacheReset @@ -539,7 +539,7 @@ public final class AEnv AD_Window_ID = PO_Window_ID; } - log.config(query + " (IsSOTrx=" + isSOTrx + ")"); + if (log.isLoggable(Level.CONFIG)) log.config(query + " (IsSOTrx=" + isSOTrx + ")"); zoom(AD_Window_ID, query); } diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/WReport.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/WReport.java index 6616e33f2e..752ebdd123 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/WReport.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/WReport.java @@ -88,7 +88,7 @@ public class WReport implements EventListener { public WReport (int AD_Table_ID, MQuery query, Component parent, int WindowNo, String whereExtended) { - log.config("AD_Table_ID=" + AD_Table_ID + " " + query); + if (log.isLoggable(Level.CONFIG)) log.config("AD_Table_ID=" + AD_Table_ID + " " + query); if (!MRole.getDefault().isCanReport(AD_Table_ID)) { FDialog.error(0, "AccessCannotReport", query.getTableName()); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WAllocation.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WAllocation.java index 6b29eb2374..74c1aa7644 100755 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WAllocation.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WAllocation.java @@ -409,7 +409,7 @@ public class WAllocation extends Allocation { String name = e.getPropertyName(); Object value = e.getNewValue(); - log.config(name + "=" + value); + if (log.isLoggable(Level.CONFIG)) log.config(name + "=" + value); if (value == null) return; diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WArchiveViewer.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WArchiveViewer.java index 09de45188d..a380b22dc9 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WArchiveViewer.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WArchiveViewer.java @@ -482,7 +482,7 @@ public class WArchiveViewer extends Archive implements IFormController, EventLis private void updateQDisplay() { boolean reports = reportField.isChecked(); - log.config("Reports=" + reports); + if (log.isLoggable(Level.CONFIG)) log.config("Reports=" + reports); // Show processLabel.setVisible(reports); @@ -624,7 +624,7 @@ public class WArchiveViewer extends Archive implements IFormController, EventLis public void query (boolean isReport, int AD_Table_ID, int Record_ID) { - log.config("Report=" + isReport + ", AD_Table_ID=" + AD_Table_ID + ",Record_ID=" + Record_ID); + if (log.isLoggable(Level.CONFIG)) log.config("Report=" + isReport + ", AD_Table_ID=" + AD_Table_ID + ",Record_ID=" + Record_ID); reportField.setChecked(isReport); m_AD_Table_ID = AD_Table_ID; m_Record_ID = Record_ID; diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WBOMDrop.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WBOMDrop.java index 7532e53642..38d5780c31 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WBOMDrop.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WBOMDrop.java @@ -368,7 +368,7 @@ public class WBOMDrop extends ADForm implements EventListener private void createMainPanel () { - log.config(": " + m_product); + if (log.isLoggable(Level.CONFIG)) log.config(": " + m_product); this.getChildren().clear(); //this.invalidate(); //this.setBorder(null); @@ -553,7 +553,7 @@ public class WBOMDrop extends ADForm implements EventListener */ public void onEvent (Event e) throws Exception { - log.config(e.getName()); + if (log.isLoggable(Level.CONFIG)) log.config(e.getName()); Object source = e.getTarget(); @@ -797,7 +797,7 @@ public class WBOMDrop extends ADForm implements EventListener private boolean cmd_saveOrder (int C_Order_ID) { - log.config("C_Order_ID=" + C_Order_ID); + if (log.isLoggable(Level.CONFIG)) log.config("C_Order_ID=" + C_Order_ID); MOrder order = new MOrder (Env.getCtx(), C_Order_ID, null); if (order.get_ID() == 0) @@ -829,7 +829,7 @@ public class WBOMDrop extends ADForm implements EventListener } // for all bom lines FDialog.info(-1, this, order.getDocumentInfo() + " " + Msg.translate(Env.getCtx(), "Inserted") + "=" + lineCount); - log.config("#" + lineCount); + if (log.isLoggable(Level.CONFIG)) log.config("#" + lineCount); return true; } // cmd_saveOrder @@ -841,7 +841,7 @@ public class WBOMDrop extends ADForm implements EventListener private boolean cmd_saveInvoice (int C_Invoice_ID) { - log.config("C_Invoice_ID=" + C_Invoice_ID); + if (log.isLoggable(Level.CONFIG)) log.config("C_Invoice_ID=" + C_Invoice_ID); MInvoice invoice = new MInvoice (Env.getCtx(), C_Invoice_ID, null); if (invoice.get_ID() == 0) { @@ -871,7 +871,7 @@ public class WBOMDrop extends ADForm implements EventListener } // for all bom lines FDialog.info(-1, this, invoice.getDocumentInfo() + " " + Msg.translate(Env.getCtx(), "Inserted") + "=" + lineCount); - log.config("#" + lineCount); + if (log.isLoggable(Level.CONFIG)) log.config("#" + lineCount); return true; } // cmd_saveInvoice @@ -882,7 +882,7 @@ public class WBOMDrop extends ADForm implements EventListener */ private boolean cmd_saveProject (int C_Project_ID) { - log.config("C_Project_ID=" + C_Project_ID); + if (log.isLoggable(Level.CONFIG)) log.config("C_Project_ID=" + C_Project_ID); MProject project = new MProject (Env.getCtx(), C_Project_ID, null); if (project.get_ID() == 0) { @@ -911,7 +911,7 @@ public class WBOMDrop extends ADForm implements EventListener } // for all bom lines FDialog.info(-1, this, project.getName() + " " + Msg.translate(Env.getCtx(), "Inserted") + "=" + lineCount); - log.config("#" + lineCount); + if (log.isLoggable(Level.CONFIG)) log.config("#" + lineCount); return true; } // cmd_saveProject } diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCreateFromDepositBatchUI.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCreateFromDepositBatchUI.java index 35c88a0272..4bc9d55f58 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCreateFromDepositBatchUI.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCreateFromDepositBatchUI.java @@ -264,7 +264,7 @@ public class WCreateFromDepositBatchUI extends CreateFromDepositBatch implements */ public void onEvent(Event e) throws Exception { - log.config("Action=" + e.getTarget().getId()); + if (log.isLoggable(Level.CONFIG)) log.config("Action=" + e.getTarget().getId()); if(e.getTarget().equals(window.getConfirmPanel().getButton(ConfirmPanel.A_REFRESH))) { loadBankAccount(); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCreateFromInvoiceUI.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCreateFromInvoiceUI.java index 34cfc810c6..29087e3a1f 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCreateFromInvoiceUI.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCreateFromInvoiceUI.java @@ -229,7 +229,7 @@ public class WCreateFromInvoiceUI extends CreateFromInvoice implements EventList */ public void valueChange (ValueChangeEvent e) { - log.config(e.getPropertyName() + "=" + e.getNewValue()); + if (log.isLoggable(Level.CONFIG)) log.config(e.getPropertyName() + "=" + e.getNewValue()); // BPartner - load Order/Invoice/Shipment if (e.getPropertyName().equals("C_BPartner_ID")) @@ -266,7 +266,7 @@ public class WCreateFromInvoiceUI extends CreateFromInvoice implements EventList */ protected void initBPOrderDetails (int C_BPartner_ID, boolean forInvoice) { - log.config("C_BPartner_ID=" + C_BPartner_ID); + if (log.isLoggable(Level.CONFIG)) log.config("C_BPartner_ID=" + C_BPartner_ID); KeyNamePair pp = new KeyNamePair(0,""); // load PO Orders - Closed, Completed orderField.removeActionListener(this); @@ -295,7 +295,7 @@ public class WCreateFromInvoiceUI extends CreateFromInvoice implements EventList */ private void initBPShipmentDetails(int C_BPartner_ID) { - log.config("C_BPartner_ID" + C_BPartner_ID); + if (log.isLoggable(Level.CONFIG)) log.config("C_BPartner_ID" + C_BPartner_ID); // load Shipments (Receipts) - Completed, Closed shipmentField.removeActionListener(this); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCreateFromRMAUI.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCreateFromRMAUI.java index 2ac705046f..0f86f8f7ce 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCreateFromRMAUI.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCreateFromRMAUI.java @@ -129,7 +129,7 @@ public class WCreateFromRMAUI extends CreateFromRMA implements ValueChangeListen */ public void valueChange (ValueChangeEvent e) { - log.config(e.getPropertyName() + "=" + e.getNewValue()); + if (log.isLoggable(Level.CONFIG)) log.config(e.getPropertyName() + "=" + e.getNewValue()); // BPartner - load Order/Invoice/Shipment if (e.getPropertyName().equals("C_BPartner_ID")) diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCreateFromShipmentUI.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCreateFromShipmentUI.java index bcfc906b4b..cbe4fb8ca1 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCreateFromShipmentUI.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCreateFromShipmentUI.java @@ -361,7 +361,7 @@ public class WCreateFromShipmentUI extends CreateFromShipment implements EventLi */ public void valueChange (ValueChangeEvent e) { - log.config(e.getPropertyName() + "=" + e.getNewValue()); + if (log.isLoggable(Level.CONFIG)) log.config(e.getPropertyName() + "=" + e.getNewValue()); // BPartner - load Order/Invoice/Shipment if (e.getPropertyName().equals("C_BPartner_ID")) @@ -397,7 +397,7 @@ public class WCreateFromShipmentUI extends CreateFromShipment implements EventLi */ private void initBPInvoiceDetails(int C_BPartner_ID) { - log.config("C_BPartner_ID" + C_BPartner_ID); + if (log.isLoggable(Level.CONFIG)) log.config("C_BPartner_ID" + C_BPartner_ID); // load Shipments (Receipts) - Completed, Closed invoiceField.removeActionListener(this); @@ -422,7 +422,7 @@ public class WCreateFromShipmentUI extends CreateFromShipment implements EventLi */ protected void initBPOrderDetails (int C_BPartner_ID, boolean forInvoice) { - log.config("C_BPartner_ID=" + C_BPartner_ID); + if (log.isLoggable(Level.CONFIG)) log.config("C_BPartner_ID=" + C_BPartner_ID); KeyNamePair pp = new KeyNamePair(0,""); // load PO Orders - Closed, Completed orderField.removeActionListener(this); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCreateFromStatementUI.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCreateFromStatementUI.java index 64ad256cf6..1c9709d1a8 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCreateFromStatementUI.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCreateFromStatementUI.java @@ -262,7 +262,7 @@ public class WCreateFromStatementUI extends CreateFromStatement implements Event */ public void onEvent(Event e) throws Exception { - log.config("Action=" + e.getTarget().getId()); + if (log.isLoggable(Level.CONFIG)) log.config("Action=" + e.getTarget().getId()); if(e.getTarget().equals(window.getConfirmPanel().getButton(ConfirmPanel.A_REFRESH))) { loadBankAccount(); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WFileImport.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WFileImport.java index b964cbc262..2a481c4a85 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WFileImport.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WFileImport.java @@ -366,7 +366,7 @@ public class WFileImport extends ADForm implements EventListener } } - log.config(media.getName()); + if (log.isLoggable(Level.CONFIG)) log.config(media.getName()); bFile.setLabel(media.getName()); cmd_reloadFile(); @@ -437,7 +437,7 @@ public class WFileImport extends ADForm implements EventListener //setCursor (Cursor.getDefaultCursor()); StringBuilder msglog = new StringBuilder("Records=").append(m_data.size()).append(", Length=").append(length); - log.config(msglog.toString()); + if (log.isLoggable(Level.CONFIG)) log.config(msglog.toString()); } // cmd_loadFile /** @@ -557,7 +557,7 @@ public class WFileImport extends ADForm implements EventListener return; } - log.config(m_format.getName()); + if (log.isLoggable(Level.CONFIG)) log.config(m_format.getName()); // For all rows - update/insert DB table diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WGenForm.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WGenForm.java index cc2c2279ca..eabcb39c01 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WGenForm.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WGenForm.java @@ -355,7 +355,7 @@ public class WGenForm extends ADForm implements EventListener, WTableMode int[] ids = genForm.getProcessInfo().getIDs(); if (ids == null || ids.length == 0) return; - log.config("PrintItems=" + ids.length); + if (log.isLoggable(Level.CONFIG)) log.config("PrintItems=" + ids.length); m_ids = ids; Clients.response(new AuEcho(this, "onAfterProcess", null)); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WMatch.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WMatch.java index f0c5178b6a..0e93bf7740 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WMatch.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WMatch.java @@ -454,7 +454,7 @@ public class WMatch extends Match private void cmd_searchTo() { int row = xMatchedTable.getSelectedRow(); - log.config("Row=" + row); + if (log.isLoggable(Level.CONFIG)) log.config("Row=" + row); double qty = 0.0; if (row < 0) @@ -498,7 +498,7 @@ public class WMatch extends Match { if (e.getColumn() != 0) return; - log.config("Row=" + e.getFirstRow() + "-" + e.getLastRow() + ", Col=" + e.getColumn() + if (log.isLoggable(Level.CONFIG)) log.config("Row=" + e.getFirstRow() + "-" + e.getLastRow() + ", Col=" + e.getColumn() + ", Type=" + e.getType()); // Matched From diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPayPrint.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPayPrint.java index 40fd3d087e..85fe2d0039 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPayPrint.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPayPrint.java @@ -533,7 +533,7 @@ public class WPayPrint extends PayPrint implements IFormController, EventListene // get data int startDocumentNo = ((Number)fDocumentNo.getValue()).intValue(); - log.config("C_PaySelection_ID=" + m_C_PaySelection_ID + ", PaymentRule=" + PaymentRule + ", DocumentNo=" + startDocumentNo); + if (log.isLoggable(Level.CONFIG)) log.config("C_PaySelection_ID=" + m_C_PaySelection_ID + ", PaymentRule=" + PaymentRule + ", DocumentNo=" + startDocumentNo); // // get Slecetions m_checks = MPaySelectionCheck.get(m_C_PaySelection_ID, PaymentRule, startDocumentNo, null); @@ -562,7 +562,7 @@ public class WPayPrint extends PayPrint implements IFormController, EventListene public void valueChange(ValueChangeEvent e) { String name = e.getPropertyName(); Object value = e.getNewValue(); - log.config(name + "=" + value); + if (log.isLoggable(Level.CONFIG)) log.config(name + "=" + value); if (value == null) return; diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaySelect.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaySelect.java index 3bc1a30984..82e7a2aeed 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaySelect.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaySelect.java @@ -278,7 +278,7 @@ public class WPaySelect extends PaySelect { Timestamp payDate = (Timestamp)fieldPayDate.getValue(); miniTable.setColorCompare(payDate); - log.config("PayDate=" + payDate); + if (log.isLoggable(Level.CONFIG)) log.config("PayDate=" + payDate); BankInfo bi = (BankInfo)fieldBankAccount.getSelectedItem().getValue(); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormCheck.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormCheck.java index ca6870a369..22e802bf7f 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormCheck.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormCheck.java @@ -16,6 +16,7 @@ package org.adempiere.webui.apps.form; import java.math.BigDecimal; import java.util.ArrayList; import java.util.Enumeration; +import java.util.logging.Level; import org.adempiere.webui.LayoutUtils; import org.adempiere.webui.component.Button; @@ -276,7 +277,7 @@ public class WPaymentFormCheck extends PaymentFormCheck implements EventListener dataOK = false; } // - log.config("OK=" + dataOK); + if (log.isLoggable(Level.CONFIG)) log.config("OK=" + dataOK); return dataOK; } diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormDirect.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormDirect.java index 0883a5d384..432c552afc 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormDirect.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormDirect.java @@ -14,6 +14,7 @@ package org.adempiere.webui.apps.form; import java.util.ArrayList; +import java.util.logging.Level; import org.adempiere.webui.LayoutUtils; import org.adempiere.webui.component.Button; @@ -153,7 +154,7 @@ public abstract class WPaymentFormDirect extends PaymentFormDirect implements Ev dataOK = false; } // - log.config("OK=" + dataOK); + if (log.isLoggable(Level.CONFIG)) log.config("OK=" + dataOK); return dataOK; } diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WStatementCreateFromBatch.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WStatementCreateFromBatch.java index 91c2ea78f3..6dfd9c67c2 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WStatementCreateFromBatch.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WStatementCreateFromBatch.java @@ -258,7 +258,7 @@ public class WStatementCreateFromBatch extends StatementCreateFromBatch implemen */ public void onEvent(Event e) throws Exception { - log.config("Action=" + e.getTarget().getId()); + if (log.isLoggable(Level.CONFIG)) log.config("Action=" + e.getTarget().getId()); if(e.getTarget().equals(form.getConfirmPanel().getButton(ConfirmPanel.A_REFRESH))) { form.postQueryEvent(); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WTreeBOM.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WTreeBOM.java index 1861c548bf..8c39b0f027 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WTreeBOM.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WTreeBOM.java @@ -290,7 +290,7 @@ public class WTreeBOM extends TreeBOM implements IFormController, EventListener< */ private void setSelectedNode (mySimpleTreeNode nd) throws Exception { - log.config("Node = " + nd); + if (log.isLoggable(Level.CONFIG)) log.config("Node = " + nd); m_selectedNode = nd; if(m_selectedNode == null) return; diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WTreeMaintenance.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WTreeMaintenance.java index eeea80f191..e6d1f4b87d 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WTreeMaintenance.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WTreeMaintenance.java @@ -267,7 +267,7 @@ public class WTreeMaintenance extends TreeMaintenance implements IFormController for(ListItem item : items) model.addElement(item); - log.config("#" + model.getSize()); + if (log.isLoggable(Level.CONFIG)) log.config("#" + model.getSize()); centerList.setItemRenderer(model); centerList.setModel(model); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/wf/WWFActivity.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/wf/WWFActivity.java index 5f7a9098cf..40f94d37cd 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/wf/WWFActivity.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/wf/WWFActivity.java @@ -559,7 +559,7 @@ public class WWFActivity extends ADForm implements EventListener */ private void cmd_zoom() { - log.config("Activity=" + m_activity); + if (log.isLoggable(Level.CONFIG)) log.config("Activity=" + m_activity); if (m_activity == null) return; AEnv.zoom(m_activity.getAD_Table_ID(), m_activity.getRecord_ID()); @@ -570,7 +570,7 @@ public class WWFActivity extends ADForm implements EventListener */ private void cmd_button() { - log.config("Activity=" + m_activity); + if (log.isLoggable(Level.CONFIG)) log.config("Activity=" + m_activity); if (m_activity == null) return; // @@ -606,7 +606,7 @@ public class WWFActivity extends ADForm implements EventListener */ public void onOK() { - log.config("Activity=" + m_activity); + if (log.isLoggable(Level.CONFIG)) log.config("Activity=" + m_activity); if (m_activity == null) { Clients.clearBusy(); @@ -627,7 +627,7 @@ public class WWFActivity extends ADForm implements EventListener if (forward != null) { - log.config("Forward to " + forward); + if (log.isLoggable(Level.CONFIG)) log.config("Forward to " + forward); int fw = ((Integer)forward).intValue(); if (fw == AD_User_ID || fw == 0) { @@ -665,7 +665,7 @@ public class WWFActivity extends ADForm implements EventListener return; } // - log.config("Answer=" + value + " - " + textMsg); + if (log.isLoggable(Level.CONFIG)) log.config("Answer=" + value + " - " + textMsg); try { m_activity.setUserChoice(AD_User_ID, value, dt, textMsg); @@ -682,7 +682,7 @@ public class WWFActivity extends ADForm implements EventListener // User Action else { - log.config("Action=" + node.getAction() + " - " + textMsg); + if (log.isLoggable(Level.CONFIG)) log.config("Action=" + node.getAction() + " - " + textMsg); try { // ensure activity is ran within a transaction diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WBinaryEditor.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WBinaryEditor.java index ab85531301..cf6145671a 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WBinaryEditor.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WBinaryEditor.java @@ -14,6 +14,8 @@ package org.adempiere.webui.editor; +import java.util.logging.Level; + import org.adempiere.webui.LayoutUtils; import org.adempiere.webui.adwindow.ADWindow; import org.adempiere.webui.adwindow.ADWindowContent; @@ -99,7 +101,7 @@ public class WBinaryEditor extends WEditor @Override public void setValue(Object value) { - log.config("=" + value); + if (log.isLoggable(Level.CONFIG)) log.config("=" + value); m_data = value; if (m_data == null) getComponent().setLabel("-"); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WLocationEditor.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WLocationEditor.java index 1e15faa58f..0649201be7 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WLocationEditor.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WLocationEditor.java @@ -19,6 +19,7 @@ package org.adempiere.webui.editor; import java.beans.PropertyChangeEvent; import java.beans.PropertyChangeListener; +import java.util.logging.Level; import org.adempiere.webui.LayoutUtils; import org.adempiere.webui.ValuePreference; @@ -163,7 +164,7 @@ public class WLocationEditor extends WEditor implements EventListener, Pr // if ("onClick".equals(event.getName())) { - log.config( "actionPerformed - " + m_value); + if (log.isLoggable(Level.CONFIG)) log.config( "actionPerformed - " + m_value); final WLocationDialog ld = new WLocationDialog(Msg.getMsg(Env.getCtx(), "Location"), m_value, gridField); ld.addEventListener(DialogEvents.ON_WINDOW_CLOSE, new EventListener() { diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WLocatorEditor.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WLocatorEditor.java index 9738880335..f5b2f69d03 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WLocatorEditor.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WLocatorEditor.java @@ -218,7 +218,7 @@ public class WLocatorEditor extends WEditor implements EventListener, Pro int only_Warehouse_ID = getOnly_Warehouse_ID(); int only_Product_ID = getOnly_Product_ID(); - log.config("Only Warehouse_ID=" + only_Warehouse_ID + ", Product_ID=" + only_Product_ID); + if (log.isLoggable(Level.CONFIG)) log.config("Only Warehouse_ID=" + only_Warehouse_ID + ", Product_ID=" + only_Product_ID); // Text Entry ok diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WPAttributeEditor.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WPAttributeEditor.java index caad530735..90a31b03d6 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WPAttributeEditor.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WPAttributeEditor.java @@ -15,6 +15,8 @@ package org.adempiere.webui.editor; +import java.util.logging.Level; + import org.adempiere.webui.apps.AEnv; import org.adempiere.webui.component.PAttributebox; import org.adempiere.webui.event.ContextMenuEvent; @@ -164,7 +166,7 @@ public class WPAttributeEditor extends WEditor implements ContextMenuListener M_ProductBOM_ID = Env.getContextAsInt (Env.getCtx (), m_WindowNo, "M_ProductBOM_ID"); } - log.config("M_Product_ID=" + M_Product_ID + "/" + M_ProductBOM_ID + if (log.isLoggable(Level.CONFIG)) log.config("M_Product_ID=" + M_Product_ID + "/" + M_ProductBOM_ID + ",M_AttributeSetInstance_ID=" + M_AttributeSetInstance_ID + ", AD_Column_ID=" + gridField.getAD_Column_ID()); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WSearchEditor.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WSearchEditor.java index 741a700843..df15206b7c 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WSearchEditor.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WSearchEditor.java @@ -367,8 +367,7 @@ public class WSearchEditor extends WEditor implements ContextMenuListener, Value resetButtonState(); return; } - if (log.isLoggable(Level.CONFIG)) - log.config(getColumnName() + " - " + text); + if (log.isLoggable(Level.CONFIG)) log.config(getColumnName() + " - " + text); int id = -1; @@ -556,14 +555,12 @@ public class WSearchEditor extends WEditor implements ContextMenuListener, Value } else if (cancelled) { - if (log.isLoggable(Level.CONFIG)) - log.config(getColumnName() + " - Result = null (cancelled)"); + if (log.isLoggable(Level.CONFIG)) log.config(getColumnName() + " - Result = null (cancelled)"); actionCombo(null); } else { - if (log.isLoggable(Level.CONFIG)) - log.config(getColumnName() + " - Result = null (not cancelled)"); + if (log.isLoggable(Level.CONFIG)) log.config(getColumnName() + " - Result = null (not cancelled)"); } } }); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/grid/WBPartner.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/grid/WBPartner.java index 4c8a2a5d5f..bc97f88443 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/grid/WBPartner.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/grid/WBPartner.java @@ -296,7 +296,7 @@ public class WBPartner extends Window implements EventListener, ValueChan public boolean loadBPartner (int C_BPartner_ID) { - log.config("C_BPartner_ID=" + C_BPartner_ID); + if (log.isLoggable(Level.CONFIG)) log.config("C_BPartner_ID=" + C_BPartner_ID); // New bpartner if (C_BPartner_ID == 0) diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/grid/WQuickEntry.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/grid/WQuickEntry.java index cb29614c19..50e92b6523 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/grid/WQuickEntry.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/grid/WQuickEntry.java @@ -248,7 +248,7 @@ public class WQuickEntry extends Window implements EventListener, ValueCh quickPOs.add(po); } - log.config("Record_ID=" + Record_ID); + if (log.isLoggable(Level.CONFIG)) log.config("Record_ID=" + Record_ID); // New record if (Record_ID == 0) diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/info/InfoProductWindow.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/info/InfoProductWindow.java index f347d4ed1c..6b98a783e3 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/info/InfoProductWindow.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/info/InfoProductWindow.java @@ -438,8 +438,7 @@ public class InfoProductWindow extends InfoWindow { if (priceDate == null) priceDate = new Timestamp(System.currentTimeMillis()); // - if (log.isLoggable(Level.CONFIG)) - log.config("M_PriceList_ID=" + M_PriceList_ID + " - " + priceDate); + if (log.isLoggable(Level.CONFIG)) log.config("M_PriceList_ID=" + M_PriceList_ID + " - " + priceDate); int retValue = 0; String sql = "SELECT plv.M_PriceList_Version_ID, plv.ValidFrom " + "FROM M_PriceList pl, M_PriceList_Version plv " @@ -498,8 +497,7 @@ public class InfoProductWindow extends InfoWindow { */ private void setPriceListVersion(int M_PriceList_Version_ID) { - if (log.isLoggable(Level.CONFIG)) - log.config("M_PriceList_Version_ID=" + M_PriceList_Version_ID); + if (log.isLoggable(Level.CONFIG)) log.config("M_PriceList_Version_ID=" + M_PriceList_Version_ID); for(WEditor editor : editors) { if (editor.getGridField() != null && editor.getGridField().getColumnName().equals("M_PriceList_Version_ID")) { diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoPAttributeInstancePanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoPAttributeInstancePanel.java index 588afa7e9c..a636f78a37 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoPAttributeInstancePanel.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoPAttributeInstancePanel.java @@ -183,7 +183,7 @@ public class InfoPAttributeInstancePanel extends Window implements EventListener */ private void dynInit(int C_BPartner_ID) { - log.config("C_BPartner_ID=" + C_BPartner_ID); + if (log.isLoggable(Level.CONFIG)) log.config("C_BPartner_ID=" + C_BPartner_ID); if (C_BPartner_ID != 0) { int ShelfLifeMinPct = 0; @@ -221,12 +221,12 @@ public class InfoPAttributeInstancePanel extends Window implements EventListener if (ShelfLifeMinPct > 0) { m_sqlMinLife = " AND COALESCE(TRUNC(((daysbetween(asi.GuaranteeDate, SYSDATE))/p.GuaranteeDays)*100),0)>=" + ShelfLifeMinPct; - log.config( "PAttributeInstance.dynInit - ShelfLifeMinPct=" + ShelfLifeMinPct); + if (log.isLoggable(Level.CONFIG)) log.config( "PAttributeInstance.dynInit - ShelfLifeMinPct=" + ShelfLifeMinPct); } if (ShelfLifeMinDays > 0) { m_sqlMinLife += " AND COALESCE((daysbetween(asi.GuaranteeDate, SYSDATE)),0)>=" + ShelfLifeMinDays; - log.config( "PAttributeInstance.dynInit - ShelfLifeMinDays=" + ShelfLifeMinDays); + if (log.isLoggable(Level.CONFIG)) log.config( "PAttributeInstance.dynInit - ShelfLifeMinDays=" + ShelfLifeMinDays); } } // BPartner != 0 diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoPanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoPanel.java index f99112c4bc..e634f2e438 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoPanel.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoPanel.java @@ -812,8 +812,7 @@ public abstract class InfoPanel extends Window implements EventListener, if (contentPanel == null) return; - if (log.isLoggable(Level.CONFIG)) - log.config( "OK=" + m_ok); + if (log.isLoggable(Level.CONFIG)) log.config( "OK=" + m_ok); if (!m_ok) // did not press OK { @@ -835,8 +834,7 @@ public abstract class InfoPanel extends Window implements EventListener, m_results.add(data); } - if (log.isLoggable(Level.CONFIG)) - log.config(getSelectedSQL()); + if (log.isLoggable(Level.CONFIG)) log.config(getSelectedSQL()); // Save Settings of detail info screens saveSelectionDetail(); @@ -945,8 +943,7 @@ public abstract class InfoPanel extends Window implements EventListener, Object[] keys = getSelectedKeys(); if (keys == null || keys.length == 0) { - if (log.isLoggable(Level.CONFIG)) - log.config("No Results - OK=" + if (log.isLoggable(Level.CONFIG)) log.config("No Results - OK=" + m_ok + ", Cancel=" + m_cancel); return ""; } @@ -1309,8 +1306,7 @@ public abstract class InfoPanel extends Window implements EventListener, */ public void dispose(boolean ok) { - if (log.isLoggable(Level.CONFIG)) - log.config("OK=" + ok); + if (log.isLoggable(Level.CONFIG)) log.config("OK=" + ok); m_ok = ok; // End Worker diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoProductPanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoProductPanel.java index 9003950513..e0c28cd45d 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoProductPanel.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoProductPanel.java @@ -889,7 +889,7 @@ public class InfoProductPanel extends InfoPanel implements EventListener */ private void setPriceListVersion(int M_PriceList_Version_ID) { - log.config("M_PriceList_Version_ID=" + M_PriceList_Version_ID); + if (log.isLoggable(Level.CONFIG)) log.config("M_PriceList_Version_ID=" + M_PriceList_Version_ID); for (int i = 0; i < pickPriceList.getItemCount(); i++) { Integer key = (Integer) pickPriceList.getItemAtIndex(i).getValue(); @@ -925,7 +925,7 @@ public class InfoProductPanel extends InfoPanel implements EventListener if (priceDate == null) priceDate = new Timestamp(System.currentTimeMillis()); // - log.config("M_PriceList_ID=" + M_PriceList_ID + " - " + priceDate); + if (log.isLoggable(Level.CONFIG)) log.config("M_PriceList_ID=" + M_PriceList_ID + " - " + priceDate); int retValue = 0; String sql = "SELECT plv.M_PriceList_Version_ID, plv.ValidFrom " + "FROM M_PriceList pl, M_PriceList_Version plv " diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InvoiceHistory.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InvoiceHistory.java index cf20d2a9c0..14e2357cbc 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InvoiceHistory.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InvoiceHistory.java @@ -74,7 +74,7 @@ public class InvoiceHistory extends Window implements EventListener { super(); setTitle(Msg.getMsg(Env.getCtx(), "PriceHistory")); - log.config("C_BPartner_ID=" + C_BPartner_ID + if (log.isLoggable(Level.CONFIG)) log.config("C_BPartner_ID=" + C_BPartner_ID + ", M_Product_ID=" + M_Product_ID + ", M_Warehouse_ID=" + M_Warehouse_ID + ", M_AttributeSetInstance_ID=" + M_AttributeSetInstance_ID); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/WAttachment.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/WAttachment.java index a1c862bfe1..4cf9421799 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/WAttachment.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/WAttachment.java @@ -150,7 +150,7 @@ public class WAttachment extends Window implements EventListener { super(); - log.config("ID=" + AD_Attachment_ID + ", Table=" + AD_Table_ID + ", Record=" + Record_ID); + if (log.isLoggable(Level.CONFIG)) log.config("ID=" + AD_Attachment_ID + ", Table=" + AD_Table_ID + ", Record=" + Record_ID); m_WindowNo = WindowNo; if (eventListener != null) @@ -412,10 +412,10 @@ public class WAttachment extends Window implements EventListener */ public void displaySelected() { MAttachmentEntry entry = m_attachment.getEntry(displayIndex); - log.config("Index=" + displayIndex + " - " + entry); + if (log.isLoggable(Level.CONFIG)) log.config("Index=" + displayIndex + " - " + entry); if (entry != null && entry.getData() != null) { - log.config(entry.toStringX()); + if (log.isLoggable(Level.CONFIG)) log.config(entry.toStringX()); try { diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/FindWindow.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/FindWindow.java index db1d016343..f45e56f0df 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/FindWindow.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/FindWindow.java @@ -956,7 +956,7 @@ public class FindWindow extends Window implements EventListener, ValueCha **/ public void addSelectionColumn(GridField mField) { - log.config(mField.getHeader()); + if (log.isLoggable(Level.CONFIG)) log.config(mField.getHeader()); int displayLength = mField.getDisplayLength(); if (displayLength <= 0 || displayLength > FIELDLENGTH) mField.setDisplayLength(FIELDLENGTH); @@ -1830,7 +1830,7 @@ public class FindWindow extends Window implements EventListener, ValueCha **/ private int getNoOfRecords (MQuery query, boolean alertZeroRecords) { - log.config("" + query); + if (log.isLoggable(Level.CONFIG)) log.config("" + query); StringBuilder sql = new StringBuilder("SELECT COUNT(*) FROM "); sql.append(m_tableName); boolean hasWhere = false; @@ -1886,7 +1886,7 @@ public class FindWindow extends Window implements EventListener, ValueCha m_total = 0; // return 0 if more then allowed - teo_sarca [ 1708717 ] } else - log.config("#" + m_total); + if (log.isLoggable(Level.CONFIG)) log.config("#" + m_total); // /*if (query != null) statusBar.setStatusToolTip (query.getWhereClause());*/ diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WAccountDialog.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WAccountDialog.java index 4d48f6a9bd..2acc32d361 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WAccountDialog.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WAccountDialog.java @@ -96,7 +96,7 @@ public final class WAccountDialog extends Window this.setHeight("500px"); this.setWidth("750px"); - log.config("C_AcctSchema_ID=" + C_AcctSchema_ID + if (log.isLoggable(Level.CONFIG)) log.config("C_AcctSchema_ID=" + C_AcctSchema_ID + ", C_ValidCombination_ID=" + mAccount.C_ValidCombination_ID); m_mAccount = mAccount; m_C_AcctSchema_ID = C_AcctSchema_ID; @@ -266,7 +266,7 @@ public final class WAccountDialog extends Window // Get AcctSchema Info if (s_AcctSchema == null || s_AcctSchema.getC_AcctSchema_ID() != m_C_AcctSchema_ID) s_AcctSchema = new MAcctSchema (Env.getCtx(), m_C_AcctSchema_ID, null); - log.config(s_AcctSchema.toString() + if (log.isLoggable(Level.CONFIG)) log.config(s_AcctSchema.toString() + ", #" + s_AcctSchema.getAcctSchemaElements().length); Env.setContext(Env.getCtx(), m_WindowNo, "C_AcctSchema_ID", m_C_AcctSchema_ID); @@ -616,7 +616,7 @@ public final class WAccountDialog extends Window int row = m_adTabPanel.getGridTab().getCurrentRow(); if (row >= 0) m_C_ValidCombination_ID = ((Integer)m_mTab.getValue(row, "C_ValidCombination_ID")).intValue(); - log.config("(" + row + ") - " + m_C_ValidCombination_ID); + if (log.isLoggable(Level.CONFIG)) log.config("(" + row + ") - " + m_C_ValidCombination_ID); } } // saveSelection @@ -647,7 +647,7 @@ public final class WAccountDialog extends Window */ public void dataStatusChanged (DataStatusEvent e) { - log.config(e.toString()); + if (log.isLoggable(Level.CONFIG)) log.config(e.toString()); String info = (String)m_mTab.getValue("Description"); if (Executions.getCurrent() != null) f_Description.setValue (info); @@ -1121,7 +1121,7 @@ public final class WAccountDialog extends Window */ public Integer getValue() { - log.config("C_ValidCombination_ID=" + m_C_ValidCombination_ID + ", Changed=" + m_changed); + if (log.isLoggable(Level.CONFIG)) log.config("C_ValidCombination_ID=" + m_C_ValidCombination_ID + ", Changed=" + m_changed); if (!m_changed || m_C_ValidCombination_ID == 0) return null; return new Integer(m_C_ValidCombination_ID); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WAssignmentDialog.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WAssignmentDialog.java index 89707493f2..1e7824bc76 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WAssignmentDialog.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WAssignmentDialog.java @@ -100,7 +100,7 @@ public class WAssignmentDialog extends Window implements EventListener this.setTitle(Msg.getMsg(Env.getCtx(), "VAssignmentDialog")); this.setBorder("normal"); this.setAttribute(Window.MODE_KEY, Window.MODE_HIGHLIGHTED); - log.config(mAssignment.toString()); + if (log.isLoggable(Level.CONFIG)) log.config(mAssignment.toString()); m_mAssignment = mAssignment; try { diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WChat.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WChat.java index 3412d6caf3..d7f2bbf111 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WChat.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WChat.java @@ -84,7 +84,7 @@ public class WChat extends Window implements EventListener, DialogEvents { super(); setTitle(Msg.getMsg(Env.getCtx(), "Chat") + " " + Description); - log.config("ID=" + CM_Chat_ID + if (log.isLoggable(Level.CONFIG)) log.config("ID=" + CM_Chat_ID + ", Table=" + AD_Table_ID + ", Record=" + Record_ID); // m_WindowNo = WindowNo; diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WLocatorDialog.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WLocatorDialog.java index 7d370062aa..42c17c8409 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WLocatorDialog.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WLocatorDialog.java @@ -552,7 +552,7 @@ public class WLocatorDialog extends Window implements EventListener lstLocator.setSelectedIndex(lstLocator.getItemCount() - 1); } // createNew - log.config("M_Locator_ID=" + m_M_Locator_ID); + if (log.isLoggable(Level.CONFIG)) log.config("M_Locator_ID=" + m_M_Locator_ID); } // actionOK /** diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WPAttributeDialog.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WPAttributeDialog.java index 65f35f5649..5f060b2a66 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WPAttributeDialog.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WPAttributeDialog.java @@ -107,7 +107,7 @@ public class WPAttributeDialog extends Window implements EventListener this.setHeight("600px"); this.setSizable(true); - log.config("M_AttributeSetInstance_ID=" + M_AttributeSetInstance_ID + if (log.isLoggable(Level.CONFIG)) log.config("M_AttributeSetInstance_ID=" + M_AttributeSetInstance_ID + ", M_Product_ID=" + M_Product_ID + ", C_BPartner_ID=" + C_BPartner_ID + ", ProductW=" + productWindow + ", Column=" + AD_Column_ID); @@ -850,7 +850,7 @@ public class WPAttributeDialog extends Window implements EventListener private void cmd_newEdit() { boolean rw = cbNewEdit.isChecked(); - log.config("R/W=" + rw + " " + m_masi); + if (log.isLoggable(Level.CONFIG)) log.config("R/W=" + rw + " " + m_masi); // fieldLotString.setReadonly(!(rw && m_masi.getM_Lot_ID()==0)); if (fieldLot != null) diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WPAttributeInstance.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WPAttributeInstance.java index ef45ddd9bd..7113762ec9 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WPAttributeInstance.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WPAttributeInstance.java @@ -191,7 +191,7 @@ public class WPAttributeInstance extends Window implements EventListener */ private void dynInit(int C_BPartner_ID) { - log.config("C_BPartner_ID=" + C_BPartner_ID); + if (log.isLoggable(Level.CONFIG)) log.config("C_BPartner_ID=" + C_BPartner_ID); if (C_BPartner_ID != 0) { int ShelfLifeMinPct = 0; @@ -229,12 +229,12 @@ public class WPAttributeInstance extends Window implements EventListener if (ShelfLifeMinPct > 0) { m_sqlMinLife = " AND COALESCE(TRUNC(((daysbetween(asi.GuaranteeDate, SYSDATE))/p.GuaranteeDays)*100),0)>=" + ShelfLifeMinPct; - log.config( "PAttributeInstance.dynInit - ShelfLifeMinPct=" + ShelfLifeMinPct); + if (log.isLoggable(Level.CONFIG)) log.config( "PAttributeInstance.dynInit - ShelfLifeMinPct=" + ShelfLifeMinPct); } if (ShelfLifeMinDays > 0) { m_sqlMinLife += " AND COALESCE((daysbetween(asi.GuaranteeDate, SYSDATE)),0)>=" + ShelfLifeMinDays; - log.config( "PAttributeInstance.dynInit - ShelfLifeMinDays=" + ShelfLifeMinDays); + if (log.isLoggable(Level.CONFIG)) log.config( "PAttributeInstance.dynInit - ShelfLifeMinDays=" + ShelfLifeMinDays); } } // BPartner != 0 diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/ZkReportViewer.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/ZkReportViewer.java index bd91144be4..abd9c36240 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/ZkReportViewer.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/ZkReportViewer.java @@ -1182,8 +1182,7 @@ public class ZkReportViewer extends Window implements EventListener, ITab continue; String restrictName = tbt.getComponentName(); - if (log.isLoggable(Level.CONFIG)) - log.config("tbt="+tbt.getAD_ToolBarButton_ID() + " / " + restrictName); + if (log.isLoggable(Level.CONFIG)) log.config("tbt="+tbt.getAD_ToolBarButton_ID() + " / " + restrictName); for (Component p = this.toolBar.getFirstChild(); p != null; p = p.getNextSibling()) { if (p instanceof Toolbarbutton) { diff --git a/org.adempiere.ui/src/org/compiere/apps/form/Allocation.java b/org.adempiere.ui/src/org/compiere/apps/form/Allocation.java index 665a761f9d..b07c39bc2c 100644 --- a/org.adempiere.ui/src/org/compiere/apps/form/Allocation.java +++ b/org.adempiere.ui/src/org/compiere/apps/form/Allocation.java @@ -89,7 +89,7 @@ public class Allocation */ public void checkBPartner() { - log.config("BPartner=" + m_C_BPartner_ID + ", Cur=" + m_C_Currency_ID); + if (log.isLoggable(Level.CONFIG)) log.config("BPartner=" + m_C_BPartner_ID + ", Cur=" + m_C_Currency_ID); // Need to have both values if (m_C_BPartner_ID == 0 || m_C_Currency_ID == 0) return; @@ -393,7 +393,7 @@ public class Allocation return msg; m_calculating = true; - log.config("Row=" + row + if (log.isLoggable(Level.CONFIG)) log.config("Row=" + row + ", Col=" + col + ", InvoiceTable=" + isInvoice); // Payments @@ -615,7 +615,7 @@ public class Allocation throw new AdempiereException("@Org0NotAllowed@"); } // - log.config("Client=" + AD_Client_ID + ", Org=" + AD_Org_ID + if (log.isLoggable(Level.CONFIG)) log.config("Client=" + AD_Client_ID + ", Org=" + AD_Org_ID + ", BPartner=" + C_BPartner_ID + ", Date=" + DateTrx); // Payment - Loop and add them to paymentList/amountList @@ -642,7 +642,7 @@ public class Allocation + " - PaymentAmt=" + PaymentAmt); // + " * " + Multiplier + " = " + PaymentAmtAbs); } } - log.config("Number of Payments=" + paymentList.size() + " - Total=" + paymentAppliedAmt); + if (log.isLoggable(Level.CONFIG)) log.config("Number of Payments=" + paymentList.size() + " - Total=" + paymentAppliedAmt); // Invoices - Loop and generate allocations int iRows = invoice.getRowCount(); @@ -670,7 +670,7 @@ public class Allocation BigDecimal OverUnderAmt = ((BigDecimal)invoice.getValueAt(i, i_open)) .subtract(AppliedAmt).subtract(DiscountAmt).subtract(WriteOffAmt); - log.config("Invoice #" + i + " - AppliedAmt=" + AppliedAmt);// + " -> " + AppliedAbs); + if (log.isLoggable(Level.CONFIG)) log.config("Invoice #" + i + " - AppliedAmt=" + AppliedAmt);// + " -> " + AppliedAbs); // loop through all payments until invoice applied for (int j = 0; j < paymentList.size() && AppliedAmt.signum() != 0; j++) @@ -679,7 +679,7 @@ public class Allocation BigDecimal PaymentAmt = (BigDecimal)amountList.get(j); if (PaymentAmt.signum() == AppliedAmt.signum()) // only match same sign (otherwise appliedAmt increases) { // and not zero (appliedAmt was checked earlier) - log.config(".. with payment #" + j + ", Amt=" + PaymentAmt); + if (log.isLoggable(Level.CONFIG)) log.config(".. with payment #" + j + ", Amt=" + PaymentAmt); BigDecimal amount = AppliedAmt; if (amount.abs().compareTo(PaymentAmt.abs()) > 0) // if there's more open on the invoice @@ -782,9 +782,9 @@ public class Allocation sql = "UPDATE C_Invoice SET IsPaid='Y' " + "WHERE C_Invoice_ID=" + C_Invoice_ID; int no = DB.executeUpdate(sql, trxName); - log.config("Invoice #" + i + " is paid - updated=" + no); + if (log.isLoggable(Level.CONFIG)) log.config("Invoice #" + i + " is paid - updated=" + no); } else - log.config("Invoice #" + i + " is not paid - " + open); + if (log.isLoggable(Level.CONFIG)) log.config("Invoice #" + i + " is not paid - " + open); } } // Test/Set Payment is fully allocated @@ -794,7 +794,7 @@ public class Allocation MPayment pay = new MPayment (Env.getCtx(), C_Payment_ID, trxName); if (pay.testAllocation()) pay.saveEx(); - log.config("Payment #" + i + (pay.isAllocated() ? " not" : " is") + if (log.isLoggable(Level.CONFIG)) log.config("Payment #" + i + (pay.isAllocated() ? " not" : " is") + " fully allocated"); } paymentList.clear(); diff --git a/org.adempiere.ui/src/org/compiere/apps/form/Charge.java b/org.adempiere.ui/src/org/compiere/apps/form/Charge.java index 59c95259c5..9de832c1dc 100644 --- a/org.adempiere.ui/src/org/compiere/apps/form/Charge.java +++ b/org.adempiere.ui/src/org/compiere/apps/form/Charge.java @@ -231,7 +231,7 @@ public class Charge MCharge charge; MAccount account; - log.config(name + " - "); + if (log.isLoggable(Level.CONFIG)) log.config(name + " - "); // Charge charge = new MCharge(Env.getCtx(), 0, null); charge.setName(name); diff --git a/org.adempiere.ui/src/org/compiere/apps/form/InOutGen.java b/org.adempiere.ui/src/org/compiere/apps/form/InOutGen.java index bf5083a6c5..59515c9a46 100644 --- a/org.adempiere.ui/src/org/compiere/apps/form/InOutGen.java +++ b/org.adempiere.ui/src/org/compiere/apps/form/InOutGen.java @@ -247,7 +247,7 @@ public class InOutGen extends GenForm if (results.size() == 0) return; - log.config("Selected #" + results.size()); + if (log.isLoggable(Level.CONFIG)) log.config("Selected #" + results.size()); setSelection(results); } // saveSelection diff --git a/org.adempiere.ui/src/org/compiere/apps/form/InvoiceGen.java b/org.adempiere.ui/src/org/compiere/apps/form/InvoiceGen.java index 24b1629c7f..e516c06077 100644 --- a/org.adempiere.ui/src/org/compiere/apps/form/InvoiceGen.java +++ b/org.adempiere.ui/src/org/compiere/apps/form/InvoiceGen.java @@ -247,7 +247,7 @@ public class InvoiceGen extends GenForm if (results.size() == 0) return; - log.config("Selected #" + results.size()); + if (log.isLoggable(Level.CONFIG)) log.config("Selected #" + results.size()); setSelection(results); } // saveSelection diff --git a/org.adempiere.ui/src/org/compiere/apps/form/Match.java b/org.adempiere.ui/src/org/compiere/apps/form/Match.java index 3b604a5714..64f9e2e046 100644 --- a/org.adempiere.ui/src/org/compiere/apps/form/Match.java +++ b/org.adempiere.ui/src/org/compiere/apps/form/Match.java @@ -225,7 +225,7 @@ public class Match protected IMiniTable cmd_searchTo(IMiniTable xMatchedTable, IMiniTable xMatchedToTable, String displayString, int matchToType, boolean sameBPartner, boolean sameProduct, boolean sameQty, boolean matched) { int row = xMatchedTable.getSelectedRow(); - log.config("Row=" + row); + if (log.isLoggable(Level.CONFIG)) log.config("Row=" + row); // ** Create SQL ** //String displayString = (String)matchTo.getSelectedItem(); @@ -273,7 +273,7 @@ public class Match protected void tableInit (int display, int matchToType, boolean matched) { //boolean matched = matchMode.getSelectedIndex() == MODE_MATCHED; - log.config("Display=" + m_matchOptions[display] + if (log.isLoggable(Level.CONFIG)) log.config("Display=" + m_matchOptions[display] + ", MatchTo=" + m_matchOptions[matchToType] + ", Matched=" + matched); diff --git a/org.adempiere.ui/src/org/compiere/apps/form/Merge.java b/org.adempiere.ui/src/org/compiere/apps/form/Merge.java index ae32e7bcce..d888a0ec00 100644 --- a/org.adempiere.ui/src/org/compiere/apps/form/Merge.java +++ b/org.adempiere.ui/src/org/compiere/apps/form/Merge.java @@ -91,7 +91,7 @@ public class Merge public boolean merge (String ColumnName, int from_ID, int to_ID) { String TableName = ColumnName.substring(0, ColumnName.length()-3); - log.config(ColumnName + if (log.isLoggable(Level.CONFIG)) log.config(ColumnName + " - From=" + from_ID + ",To=" + to_ID); boolean success = true; @@ -136,7 +136,7 @@ public class Merge } } // - log.config("Success=" + success + if (log.isLoggable(Level.CONFIG)) log.config("Success=" + success + " - " + ColumnName + " - From=" + from_ID + ",To=" + to_ID); if (success) { @@ -150,7 +150,7 @@ public class Merge m_errorLog.append(Env.NL).append("DELETE ").append(TableName) .append(" - "); success = false; - log.config(m_errorLog.toString()); + if (log.isLoggable(Level.CONFIG)) log.config(m_errorLog.toString()); m_trx.rollback(); return false; } @@ -224,7 +224,7 @@ public class Merge .append(delete ? "DELETE " : "UPDATE ") .append(TableName).append(" - ") .append(" - ").append(sql); - log.config(m_errorLog.toString()); + if (log.isLoggable(Level.CONFIG)) log.config(m_errorLog.toString()); m_trx.rollback(); } diff --git a/org.adempiere.ui/src/org/compiere/apps/form/PayPrint.java b/org.adempiere.ui/src/org/compiere/apps/form/PayPrint.java index ced8f39a0b..c0214f5922 100644 --- a/org.adempiere.ui/src/org/compiere/apps/form/PayPrint.java +++ b/org.adempiere.ui/src/org/compiere/apps/form/PayPrint.java @@ -189,7 +189,7 @@ public class PayPrint { } if (data.size() == 0) - log.config("PaySel=" + C_PaySelection_ID + ", BAcct=" + m_C_BankAccount_ID + " - " + sql); + if (log.isLoggable(Level.CONFIG)) log.config("PaySel=" + C_PaySelection_ID + ", BAcct=" + m_C_BankAccount_ID + " - " + sql); return data; } // loadPaymentRule diff --git a/org.adempiere.ui/src/org/compiere/apps/form/PaySelect.java b/org.adempiere.ui/src/org/compiere/apps/form/PaySelect.java index 3e89ec34c2..12da75922a 100644 --- a/org.adempiere.ui/src/org/compiere/apps/form/PaySelect.java +++ b/org.adempiere.ui/src/org/compiere/apps/form/PaySelect.java @@ -431,7 +431,7 @@ public class PaySelect m_ps = null; return Msg.translate(Env.getCtx(), "C_PaySelection_ID"); } - log.config(m_ps.toString()); + if (log.isLoggable(Level.CONFIG)) log.config(m_ps.toString()); // Create Lines int rows = miniTable.getRowCount(); diff --git a/org.adempiere.ui/src/org/compiere/apps/form/StatementCreateFromBatch.java b/org.adempiere.ui/src/org/compiere/apps/form/StatementCreateFromBatch.java index a253ab30fa..615d3381d5 100644 --- a/org.adempiere.ui/src/org/compiere/apps/form/StatementCreateFromBatch.java +++ b/org.adempiere.ui/src/org/compiere/apps/form/StatementCreateFromBatch.java @@ -177,7 +177,7 @@ public abstract class StatementCreateFromBatch extends CreateFromForm Object DateFrom, Object DateTo, Object AmtFrom, Object AmtTo, Object DocType, Object TenderType, String AuthCode, GridTab gridTab) { - log.config ("C_BankAccount_ID=" + BankAccount); + if (log.isLoggable(Level.CONFIG)) log.config ("C_BankAccount_ID=" + BankAccount); Vector> data = new Vector>(); StringBuilder sql = new StringBuilder(); @@ -248,7 +248,7 @@ public abstract class StatementCreateFromBatch extends CreateFromForm // fixed values int C_BankStatement_ID = ((Integer) gridTab.getValue("C_BankStatement_ID")).intValue(); MBankStatement bs = new MBankStatement (Env.getCtx(), C_BankStatement_ID, null); - log.config(bs.toString()); + if (log.isLoggable(Level.CONFIG)) log.config(bs.toString()); StringBuilder sql = new StringBuilder(); sql.append("SELECT p.DateTrx,p.C_Payment_ID,p.DocumentNo, p.C_Currency_ID,c.ISO_Code, p.PayAmt,"); diff --git a/org.adempiere.ui/src/org/compiere/apps/form/TrxMaterial.java b/org.adempiere.ui/src/org/compiere/apps/form/TrxMaterial.java index d80d4d50a6..1d07c8dc94 100644 --- a/org.adempiere.ui/src/org/compiere/apps/form/TrxMaterial.java +++ b/org.adempiere.ui/src/org/compiere/apps/form/TrxMaterial.java @@ -194,7 +194,7 @@ public class TrxMaterial { pstmt = null; } query = MQuery.getEqualQuery(ColumnName, parentID); - log.config("AD_Window_ID=" + AD_Window_ID + " - " + query); + if (log.isLoggable(Level.CONFIG)) log.config("AD_Window_ID=" + AD_Window_ID + " - " + query); if (parentID == 0) log.log(Level.SEVERE, "No ParentValue - " + SQL + " - " + lineID); } // zoom diff --git a/org.adempiere.ui/src/org/compiere/grid/CreateFrom.java b/org.adempiere.ui/src/org/compiere/grid/CreateFrom.java index 685f6386ed..844daf39e1 100644 --- a/org.adempiere.ui/src/org/compiere/grid/CreateFrom.java +++ b/org.adempiere.ui/src/org/compiere/grid/CreateFrom.java @@ -150,7 +150,7 @@ public abstract class CreateFrom implements ICreateFrom * ShipmentLine - 6 * InvoiceLine - 7 */ - log.config("C_Order_ID=" + C_Order_ID); + if (log.isLoggable(Level.CONFIG)) log.config("C_Order_ID=" + C_Order_ID); p_order = new MOrder (Env.getCtx(), C_Order_ID, null); Vector> data = new Vector>(); diff --git a/org.adempiere.ui/src/org/compiere/grid/CreateFromDepositBatch.java b/org.adempiere.ui/src/org/compiere/grid/CreateFromDepositBatch.java index 6e95890e4f..f94b4bde06 100644 --- a/org.adempiere.ui/src/org/compiere/grid/CreateFromDepositBatch.java +++ b/org.adempiere.ui/src/org/compiere/grid/CreateFromDepositBatch.java @@ -125,7 +125,7 @@ public abstract class CreateFromDepositBatch extends CreateFromBatch // fixed values int X_DepositBatch_ID = ((Integer) getGridTab().getValue("X_DepositBatch_ID")).intValue(); MDepositBatch db = new MDepositBatch(Env.getCtx(), X_DepositBatch_ID, null); - log.config(db.toString()); + if (log.isLoggable(Level.CONFIG)) log.config(db.toString()); // Lines for(int i = 0; i < miniTable.getRowCount(); i++) diff --git a/org.adempiere.ui/src/org/compiere/grid/CreateFromInvoice.java b/org.adempiere.ui/src/org/compiere/grid/CreateFromInvoice.java index b80a3391b5..d6b88488eb 100644 --- a/org.adempiere.ui/src/org/compiere/grid/CreateFromInvoice.java +++ b/org.adempiere.ui/src/org/compiere/grid/CreateFromInvoice.java @@ -168,7 +168,7 @@ public abstract class CreateFromInvoice extends CreateFrom */ protected Vector> getShipmentData(int M_InOut_ID) { - log.config("M_InOut_ID=" + M_InOut_ID); + if (log.isLoggable(Level.CONFIG)) log.config("M_InOut_ID=" + M_InOut_ID); MInOut inout = new MInOut(Env.getCtx(), M_InOut_ID, null); p_order = null; if (inout.getC_Order_ID() != 0) @@ -362,7 +362,7 @@ public abstract class CreateFromInvoice extends CreateFrom // Invoice int C_Invoice_ID = ((Integer)getGridTab().getValue("C_Invoice_ID")).intValue(); MInvoice invoice = new MInvoice (Env.getCtx(), C_Invoice_ID, trxName); - log.config(invoice.toString()); + if (log.isLoggable(Level.CONFIG)) log.config(invoice.toString()); if (p_order != null) { diff --git a/org.adempiere.ui/src/org/compiere/grid/CreateFromPackageShipment.java b/org.adempiere.ui/src/org/compiere/grid/CreateFromPackageShipment.java index 15720979b6..812a45de9a 100644 --- a/org.adempiere.ui/src/org/compiere/grid/CreateFromPackageShipment.java +++ b/org.adempiere.ui/src/org/compiere/grid/CreateFromPackageShipment.java @@ -57,7 +57,7 @@ public abstract class CreateFromPackageShipment extends CreateFrom protected Vector> getShipmentData(int M_InOut_ID) { - log.config("M_InOut_ID=" + M_InOut_ID); + if (log.isLoggable(Level.CONFIG)) log.config("M_InOut_ID=" + M_InOut_ID); Vector> data = new Vector>(); StringBuilder sqlStmt = new StringBuilder(); diff --git a/org.adempiere.ui/src/org/compiere/grid/CreateFromShipment.java b/org.adempiere.ui/src/org/compiere/grid/CreateFromShipment.java index d90106e647..aa91a86bc9 100644 --- a/org.adempiere.ui/src/org/compiere/grid/CreateFromShipment.java +++ b/org.adempiere.ui/src/org/compiere/grid/CreateFromShipment.java @@ -187,7 +187,7 @@ public abstract class CreateFromShipment extends CreateFrom * ShipmentLine - 7 * InvoiceLine - 8 */ - log.config("C_Order_ID=" + C_Order_ID); + if (log.isLoggable(Level.CONFIG)) log.config("C_Order_ID=" + C_Order_ID); p_order = new MOrder (Env.getCtx(), C_Order_ID, null); // save Vector> data = new Vector>(); @@ -552,7 +552,7 @@ public abstract class CreateFromShipment extends CreateFrom // Get Shipment int M_InOut_ID = ((Integer) getGridTab().getValue("M_InOut_ID")).intValue(); MInOut inout = new MInOut(Env.getCtx(), M_InOut_ID, trxName); - log.config(inout + ", C_Locator_ID=" + M_Locator_ID); + if (log.isLoggable(Level.CONFIG)) log.config(inout + ", C_Locator_ID=" + M_Locator_ID); // Lines for (int i = 0; i < miniTable.getRowCount(); i++) diff --git a/org.adempiere.ui/src/org/compiere/grid/CreateFromStatement.java b/org.adempiere.ui/src/org/compiere/grid/CreateFromStatement.java index dfd247f600..a21fcec4aa 100644 --- a/org.adempiere.ui/src/org/compiere/grid/CreateFromStatement.java +++ b/org.adempiere.ui/src/org/compiere/grid/CreateFromStatement.java @@ -120,7 +120,7 @@ public abstract class CreateFromStatement extends CreateFromBatch // fixed values int C_BankStatement_ID = ((Integer) getGridTab().getValue("C_BankStatement_ID")).intValue(); MBankStatement bs = new MBankStatement (Env.getCtx(), C_BankStatement_ID, trxName); - log.config(bs.toString()); + if (log.isLoggable(Level.CONFIG)) log.config(bs.toString()); // Lines for(int i = 0; i < miniTable.getRowCount(); i++) diff --git a/org.adempiere.ui/src/org/compiere/grid/PaymentFormCash.java b/org.adempiere.ui/src/org/compiere/grid/PaymentFormCash.java index dd1a0aa7d7..d86fc19b35 100644 --- a/org.adempiere.ui/src/org/compiere/grid/PaymentFormCash.java +++ b/org.adempiere.ui/src/org/compiere/grid/PaymentFormCash.java @@ -267,7 +267,7 @@ public abstract class PaymentFormCash extends PaymentForm { if (negateAmt) payAmount = m_Amount.negate(); // Info - log.config("C_Order_ID=" + C_Order_ID + ", C_Invoice_ID=" + C_Invoice_ID + ", NegateAmt=" + negateAmt); + if (log.isLoggable(Level.CONFIG)) log.config("C_Order_ID=" + C_Order_ID + ", C_Invoice_ID=" + C_Invoice_ID + ", NegateAmt=" + negateAmt); /*********************** * CashBook @@ -298,7 +298,7 @@ public abstract class PaymentFormCash extends PaymentForm { && (newC_CashBook_ID != m_C_CashBook_ID || !TimeUtil.isSameDay(m_cashLine.getStatementDate(), newDateAcct))) { - log.config("Changed CashBook/Date: " + m_C_CashBook_ID + "->" + newC_CashBook_ID); + if (log.isLoggable(Level.CONFIG)) log.config("Changed CashBook/Date: " + m_C_CashBook_ID + "->" + newC_CashBook_ID); MCashLine reverse = m_cashLine.createReversal(); reverse.saveEx(); m_cashLine = null; diff --git a/org.adempiere.ui/src/org/compiere/grid/PaymentFormCheck.java b/org.adempiere.ui/src/org/compiere/grid/PaymentFormCheck.java index 4e7682ea4b..594f9c87ec 100644 --- a/org.adempiere.ui/src/org/compiere/grid/PaymentFormCheck.java +++ b/org.adempiere.ui/src/org/compiere/grid/PaymentFormCheck.java @@ -215,7 +215,7 @@ public abstract class PaymentFormCheck extends PaymentForm { if (negateAmt) payAmount = m_Amount.negate(); // Info - log.config("C_Order_ID=" + C_Order_ID + ", C_Invoice_ID=" + C_Invoice_ID + ", NegateAmt=" + negateAmt); + if (log.isLoggable(Level.CONFIG)) log.config("C_Order_ID=" + C_Order_ID + ", C_Invoice_ID=" + C_Invoice_ID + ", NegateAmt=" + negateAmt); /*********************** * Payments diff --git a/org.adempiere.ui/src/org/compiere/grid/PaymentFormDirect.java b/org.adempiere.ui/src/org/compiere/grid/PaymentFormDirect.java index d16de49eae..7f4a418549 100644 --- a/org.adempiere.ui/src/org/compiere/grid/PaymentFormDirect.java +++ b/org.adempiere.ui/src/org/compiere/grid/PaymentFormDirect.java @@ -205,7 +205,7 @@ public abstract class PaymentFormDirect extends PaymentForm { if (negateAmt) payAmount = m_Amount.negate(); // Info - log.config("C_Order_ID=" + C_Order_ID + ", C_Invoice_ID=" + C_Invoice_ID + ", NegateAmt=" + negateAmt); + if (log.isLoggable(Level.CONFIG)) log.config("C_Order_ID=" + C_Order_ID + ", C_Invoice_ID=" + C_Invoice_ID + ", NegateAmt=" + negateAmt); /*********************** * Payments diff --git a/org.adempiere.webstore.servlet/src/org/compiere/wstore/RequestTypeTag.java b/org.adempiere.webstore.servlet/src/org/compiere/wstore/RequestTypeTag.java index 537121e0aa..18946d096a 100644 --- a/org.adempiere.webstore.servlet/src/org/compiere/wstore/RequestTypeTag.java +++ b/org.adempiere.webstore.servlet/src/org/compiere/wstore/RequestTypeTag.java @@ -86,7 +86,7 @@ public class RequestTypeTag extends TagSupport if (AD_Client_ID == 0) log.log(Level.SEVERE, "AD_Client_ID not found"); else - log.config("AD_Client_ID=" + AD_Client_ID); + if (log.isLoggable(Level.CONFIG)) log.config("AD_Client_ID=" + AD_Client_ID); ArrayList