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

This commit is contained in:
Richard Morales 2013-02-25 12:29:10 -05:00
parent 6ae0aaaa82
commit e0b18312f8
205 changed files with 495 additions and 472 deletions

View File

@ -361,7 +361,7 @@ public class CalloutInOut extends CalloutEngine
Env.setContext(ctx, WindowNo, 0, "M_Locator_ID", null); Env.setContext(ctx, WindowNo, 0, "M_Locator_ID", null);
else 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()); Env.setContext(ctx, WindowNo, "M_Locator_ID", ii.intValue());
} }
} }

View File

@ -138,7 +138,7 @@ public class BOMValidate extends SvrProcess
m_product = product; m_product = product;
// Check Old Product BOM Structure // Check Old Product BOM Structure
log.config(m_product.getName()); if (log.isLoggable(Level.CONFIG)) log.config(m_product.getName());
m_products = new ArrayList<MProduct>(); m_products = new ArrayList<MProduct>();
if (!validateOldProduct (m_product)) if (!validateOldProduct (m_product))
{ {

View File

@ -148,7 +148,7 @@ public class BOMVerify extends SvrProcess
// Check Old Product BOM Structure // Check Old Product BOM Structure
log.config(product.getName()); if (log.isLoggable(Level.CONFIG)) log.config(product.getName());
foundproducts.add(product); foundproducts.add(product);

View File

@ -392,7 +392,7 @@ public class ChangeLogProcess extends SvrProcess
.append (" WHERE EntityType IN ('D','C'))"); .append (" WHERE EntityType IN ('D','C'))");
int no = DB.executeUpdate(update.toString(), get_TrxName()); int no = DB.executeUpdate(update.toString(), get_TrxName());
StringBuilder msglog = new StringBuilder().append(table.getTableName()).append(" = ").append(no); 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; updateNo += no;
} }

View File

@ -184,7 +184,7 @@ public class ColumnEncryption extends SvrProcess {
testClear.delete(p_MaxLength,testClear.length()); testClear.delete(p_MaxLength,testClear.length());
msglog = new StringBuilder() msglog = new StringBuilder()
.append("Test=").append(testClear.toString()).append(" (").append(p_MaxLength).append(")"); .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); String encString = SecureEngine.encrypt(testClear.toString(), 0);
int encLength = encString.length(); int encLength = encString.length();

View File

@ -130,7 +130,7 @@ public class CostUpdate extends SvrProcess
m_ce = MCostElement.getMaterialCostElement(client, MAcctSchema.COSTINGMETHOD_StandardCosting); m_ce = MCostElement.getMaterialCostElement(client, MAcctSchema.COSTINGMETHOD_StandardCosting);
if (m_ce.get_ID() == 0) if (m_ce.get_ID() == 0)
throw new AdempiereUserError ("@NotFound@ @M_CostElement_ID@ (StdCost)"); 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()); m_ass = MAcctSchema.getClientAcctSchema(getCtx(), client.getAD_Client_ID());
for (int i = 0; i < m_ass.length; i++) for (int i = 0; i < m_ass.length; i++)
createNew(m_ass[i]); createNew(m_ass[i]);

View File

@ -146,7 +146,7 @@ public class ImportAccount extends SvrProcess
.append("WHERE C_Element_ID IS NULL") .append("WHERE C_Element_ID IS NULL")
.append(" AND I_IsImported<>'Y'").append(clientCheck); .append(" AND I_IsImported<>'Y'").append(clientCheck);
no = DB.executeUpdate(sql.toString(), get_TrxName()); 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 // No Name, Value
sql = new StringBuilder ("UPDATE I_ElementValue ") 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("WHERE (Value IS NULL OR Name IS NULL)")
.append(" AND I_IsImported<>'Y'").append(clientCheck); .append(" AND I_IsImported<>'Y'").append(clientCheck);
no = DB.executeUpdate(sql.toString(), get_TrxName()); no = DB.executeUpdate(sql.toString(), get_TrxName());
log.config("Invalid Name=" + no); if (log.isLoggable(Level.CONFIG)) log.config("Invalid Name=" + no);
// Set Column // Set Column
@ -173,7 +173,7 @@ public class ImportAccount extends SvrProcess
.append(" AND UPPER(Default_Account)<>'DEFAULT_ACCT'") // ignore default account .append(" AND UPPER(Default_Account)<>'DEFAULT_ACCT'") // ignore default account
.append(" AND I_IsImported<>'Y'").append(clientCheck); .append(" AND I_IsImported<>'Y'").append(clientCheck);
no = DB.executeUpdate(sql.toString(), get_TrxName()); 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) // Set Post* Defaults (ignore errors)
String[] yColumns = new String[] {"PostActual", "PostBudget", "PostStatistical", "PostEncumbrance"}; 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("WHERE AccountType NOT IN ('A','E','L','M','O','R')")
.append(" AND I_IsImported<>'Y'").append(clientCheck); .append(" AND I_IsImported<>'Y'").append(clientCheck);
no = DB.executeUpdate(sql.toString(), get_TrxName()); 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 // Check Account Sign (N) C B
sql = new StringBuilder ("UPDATE I_ElementValue ") sql = new StringBuilder ("UPDATE I_ElementValue ")
@ -232,7 +232,7 @@ public class ImportAccount extends SvrProcess
.append("WHERE AccountSign NOT IN ('N','C','D')") .append("WHERE AccountSign NOT IN ('N','C','D')")
.append(" AND I_IsImported<>'Y'").append(clientCheck); .append(" AND I_IsImported<>'Y'").append(clientCheck);
no = DB.executeUpdate(sql.toString(), get_TrxName()); no = DB.executeUpdate(sql.toString(), get_TrxName());
log.config("Invalid AccountSign=" + no); if (log.isLoggable(Level.CONFIG)) log.config("Invalid AccountSign=" + no);
// No Value // No Value
sql = new StringBuilder ("UPDATE I_ElementValue ") sql = new StringBuilder ("UPDATE I_ElementValue ")
@ -240,7 +240,7 @@ public class ImportAccount extends SvrProcess
.append("WHERE (Value IS NULL OR Value='')") .append("WHERE (Value IS NULL OR Value='')")
.append(" AND I_IsImported<>'Y'").append(clientCheck); .append(" AND I_IsImported<>'Y'").append(clientCheck);
no = DB.executeUpdate(sql.toString(), get_TrxName()); 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 // **** Update ElementValue from existing
sql = new StringBuilder ("UPDATE I_ElementValue i ") 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("WHERE ParentElementValue_ID IS NULL AND ParentValue IS NOT NULL")
.append(" AND I_IsImported='Y' AND Processed='N'").append(clientCheck); .append(" AND I_IsImported='Y' AND Processed='N'").append(clientCheck);
no = DB.executeUpdate(sql.toString(), get_TrxName()); 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,") 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 ") .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) private void updateDefaults (String clientCheck)
{ {
log.config("CreateNewCombination=" + m_createNewCombination); if (log.isLoggable(Level.CONFIG)) log.config("CreateNewCombination=" + m_createNewCombination);
// **** Update Defaults // **** Update Defaults
StringBuilder sql = new StringBuilder ("SELECT C_AcctSchema_ID FROM C_AcctSchema_Element ") 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) 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()); MAcctSchema as = new MAcctSchema (getCtx(), C_AcctSchema_ID, get_TrxName());
if (as.getAcctSchemaElement("AC").getC_Element_ID() != m_C_Element_ID) if (as.getAcctSchemaElement("AC").getC_Element_ID() != m_C_Element_ID)

View File

@ -145,7 +145,7 @@ implements ImportProcess
.append("WHERE C_BP_Group_ID IS NULL") .append("WHERE C_BP_Group_ID IS NULL")
.append(" AND I_IsImported<>'Y'").append(clientCheck); .append(" AND I_IsImported<>'Y'").append(clientCheck);
no = DB.executeUpdateEx(sql.toString(), get_TrxName()); no = DB.executeUpdateEx(sql.toString(), get_TrxName());
log.config("Invalid Group=" + no); if (log.isLoggable(Level.CONFIG)) log.config("Invalid Group=" + no);
// Set Country // 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("WHERE C_Country_ID IS NULL AND (City IS NOT NULL OR Address1 IS NOT NULL)")
.append(" AND I_IsImported<>'Y'").append(clientCheck); .append(" AND I_IsImported<>'Y'").append(clientCheck);
no = DB.executeUpdateEx(sql.toString(), get_TrxName()); no = DB.executeUpdateEx(sql.toString(), get_TrxName());
log.config("Invalid Country=" + no); if (log.isLoggable(Level.CONFIG)) log.config("Invalid Country=" + no);
// Set Region // Set Region
sql = new StringBuilder ("UPDATE I_BPartner i ") 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(" WHERE c.C_Country_ID=i.C_Country_ID AND c.HasRegion='Y')")
.append(" AND I_IsImported<>'Y'").append(clientCheck); .append(" AND I_IsImported<>'Y'").append(clientCheck);
no = DB.executeUpdateEx(sql.toString(), get_TrxName()); no = DB.executeUpdateEx(sql.toString(), get_TrxName());
log.config("Invalid Region=" + no); if (log.isLoggable(Level.CONFIG)) log.config("Invalid Region=" + no);
// Set Greeting // Set Greeting
sql = new StringBuilder ("UPDATE I_BPartner i ") 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("WHERE C_Greeting_ID IS NULL AND BPContactGreeting IS NOT NULL")
.append(" AND I_IsImported<>'Y'").append(clientCheck); .append(" AND I_IsImported<>'Y'").append(clientCheck);
no = DB.executeUpdateEx(sql.toString(), get_TrxName()); no = DB.executeUpdateEx(sql.toString(), get_TrxName());
log.config("Invalid Greeting=" + no); if (log.isLoggable(Level.CONFIG)) log.config("Invalid Greeting=" + no);
// Existing User ? // Existing User ?
sql = new StringBuilder ("UPDATE I_BPartner i ") sql = new StringBuilder ("UPDATE I_BPartner i ")
@ -276,7 +276,7 @@ implements ImportProcess
.append("WHERE Value IS NULL ") .append("WHERE Value IS NULL ")
.append(" AND I_IsImported<>'Y'").append(clientCheck); .append(" AND I_IsImported<>'Y'").append(clientCheck);
no = DB.executeUpdateEx(sql.toString(), get_TrxName()); 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); ModelValidationEngine.get().fireImportValidate(this, null, null, ImportValidator.TIMING_AFTER_VALIDATE);

View File

@ -131,7 +131,7 @@ public class ImportReportLine extends SvrProcess
.append("WHERE PA_ReportLineSet_ID IS NULL") .append("WHERE PA_ReportLineSet_ID IS NULL")
.append(" AND I_IsImported<>'Y'").append(clientCheck); .append(" AND I_IsImported<>'Y'").append(clientCheck);
no = DB.executeUpdate(sql.toString(), get_TrxName()); 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 // Ignore if there is no Report Line Name or ID
sql = new StringBuilder ("UPDATE I_ReportLine ") 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("WHERE PA_ReportLine_ID IS NULL AND Name IS NULL")
.append(" AND I_IsImported<>'Y'").append(clientCheck); .append(" AND I_IsImported<>'Y'").append(clientCheck);
no = DB.executeUpdate(sql.toString(), get_TrxName()); no = DB.executeUpdate(sql.toString(), get_TrxName());
log.config("Invalid LineName=" + no); if (log.isLoggable(Level.CONFIG)) log.config("Invalid LineName=" + no);
// Validate ElementValue // Validate ElementValue
sql = new StringBuilder ("UPDATE I_ReportLine i ") 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("WHERE C_ElementValue_ID IS NULL AND LineType<>'C'") // MReportLine.LINETYPE_Calculation
.append(" AND I_IsImported<>'Y'").append(clientCheck); .append(" AND I_IsImported<>'Y'").append(clientCheck);
no = DB.executeUpdate(sql.toString(), get_TrxName()); no = DB.executeUpdate(sql.toString(), get_TrxName());
log.config("Invalid AccountType=" + no); if (log.isLoggable(Level.CONFIG)) log.config("Invalid AccountType=" + no);
// Set SeqNo // Set SeqNo
sql = new StringBuilder ("UPDATE I_ReportLine ") 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("WHERE CalculationType IS NOT NULL AND CalculationType NOT IN ('A','P','R','S')")
.append(" AND I_IsImported<>'Y'").append(clientCheck); .append(" AND I_IsImported<>'Y'").append(clientCheck);
no = DB.executeUpdate(sql.toString(), get_TrxName()); 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 // Convert Optional Amount Type to PAAmount Type and PAPeriodType
sql = new StringBuilder ("UPDATE I_ReportLine ") 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("WHERE AmountType IS NOT NULL AND (PAAmountType IS NULL OR PAPeriodType IS NULL) ")
.append(" AND I_IsImported<>'Y'").append(clientCheck); .append(" AND I_IsImported<>'Y'").append(clientCheck);
no = DB.executeUpdate(sql.toString(), get_TrxName()); 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 - // Validate Optional Amount Type -
sql = new StringBuilder ("UPDATE I_ReportLine ") 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("WHERE PAAmountType IS NOT NULL AND UPPER(AmountType) NOT IN ('B','C','D','Q','S','R')")
.append(" AND I_IsImported<>'Y'").append(clientCheck); .append(" AND I_IsImported<>'Y'").append(clientCheck);
no = DB.executeUpdate(sql.toString(), get_TrxName()); 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 - // Validate Optional Period Type -
sql = new StringBuilder ("UPDATE I_ReportLine ") 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("WHERE PAPeriodType IS NOT NULL AND UPPER(AmountType) NOT IN ('P','Y','T','N')")
.append(" AND I_IsImported<>'Y'").append(clientCheck); .append(" AND I_IsImported<>'Y'").append(clientCheck);
no = DB.executeUpdate(sql.toString(), get_TrxName()); 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 // Validate Optional Posting Type - A B E S R
sql = new StringBuilder ("UPDATE I_ReportLine ") 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("WHERE PostingType IS NOT NULL AND PostingType NOT IN ('A','B','E','S','R')")
.append(" AND I_IsImported<>'Y'").append(clientCheck); .append(" AND I_IsImported<>'Y'").append(clientCheck);
no = DB.executeUpdate(sql.toString(), get_TrxName()); 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 // Set PA_ReportLine_ID
sql = new StringBuilder ("UPDATE I_ReportLine i ") 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(" WHERE i.Name=iii.Name AND i.PA_ReportLineSet_ID=iii.PA_ReportLineSet_ID AND i.I_IsImported='N'))")
.append(clientCheck); .append(clientCheck);
noUpdateLine = DB.executeUpdate(sql.toString(), get_TrxName()); noUpdateLine = DB.executeUpdate(sql.toString(), get_TrxName());
log.config("Update PA_ReportLine=" + noUpdateLine); if (log.isLoggable(Level.CONFIG)) log.config("Update PA_ReportLine=" + noUpdateLine);
// ------------------------------------------------------------------- // -------------------------------------------------------------------

View File

@ -174,7 +174,7 @@ public class InvoiceNGL extends SvrProcess
.append("WHERE AD_PInstance_ID=").append(getAD_PInstance_ID()); .append("WHERE AD_PInstance_ID=").append(getAD_PInstance_ID());
int noT = DB.executeUpdate(sql.toString(), get_TrxName()); int noT = DB.executeUpdate(sql.toString(), get_TrxName());
if (noT > 0) if (noT > 0)
log.config("Difference #" + noT); if (log.isLoggable(Level.CONFIG)) log.config("Difference #" + noT);
// Percentage // Percentage
sql = new StringBuilder("UPDATE T_InvoiceGL SET Percent = 100 ") 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()); .append("WHERE Percent <> 100 AND AD_PInstance_ID=").append(getAD_PInstance_ID());
no = DB.executeUpdate(sql.toString(), get_TrxName()); no = DB.executeUpdate(sql.toString(), get_TrxName());
if (no > 0) if (no > 0)
log.config("Partial Calc #" + no); if (log.isLoggable(Level.CONFIG)) log.config("Partial Calc #" + no);
// Create Document // Create Document
String info = ""; String info = "";

View File

@ -82,7 +82,7 @@ public class RfQCreatePO extends SvrProcess
// Complete // Complete
MRfQResponse[] responses = rfq.getResponses(true, true); 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) if (responses.length == 0)
throw new IllegalArgumentException("No completed RfQ Responses found"); throw new IllegalArgumentException("No completed RfQ Responses found");
@ -94,7 +94,7 @@ public class RfQCreatePO extends SvrProcess
continue; continue;
// //
MBPartner bp = new MBPartner(getCtx(), response.getC_BPartner_ID(), get_TrxName()); 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()); MOrder order = new MOrder (getCtx(), 0, get_TrxName());
order.setIsSOTrx(false); order.setIsSOTrx(false);
if (p_C_DocType_ID != 0) 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()); bp = new MBPartner(getCtx(), response.getC_BPartner_ID(), get_TrxName());
order = null; order = null;
} }
log.config("Line=" + line + ", Winner=" + bp); if (log.isLoggable(Level.CONFIG)) log.config("Line=" + line + ", Winner=" + bp);
// New Order // New Order
if (order == null) if (order == null)
{ {

View File

@ -233,7 +233,7 @@ public class TableCreateColumns extends SvrProcess
int size = rs.getInt ("COLUMN_SIZE"); int size = rs.getInt ("COLUMN_SIZE");
int digits = rs.getInt ("DECIMAL_DIGITS"); 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=" + ", Nullable=" + nullable + ", Size=" + size + ", Digits="
+ digits); + digits);
// //

View File

@ -87,11 +87,11 @@ public class TaxDeclarationCreate extends SvrProcess
String sql = "DELETE C_TaxDeclarationLine WHERE C_TaxDeclaration_ID=?"; String sql = "DELETE C_TaxDeclarationLine WHERE C_TaxDeclaration_ID=?";
int no = DB.executeUpdate(sql, p_C_TaxDeclaration_ID, false, get_TrxName()); int no = DB.executeUpdate(sql, p_C_TaxDeclaration_ID, false, get_TrxName());
if (no != 0) 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=?"; sql = "DELETE C_TaxDeclarationAcct WHERE C_TaxDeclaration_ID=?";
no = DB.executeUpdate(sql, p_C_TaxDeclaration_ID, false, get_TrxName()); no = DB.executeUpdate(sql, p_C_TaxDeclaration_ID, false, get_TrxName());
if (no != 0) if (no != 0)
log.config("Delete Acct #" + no); if (log.isLoggable(Level.CONFIG)) log.config("Delete Acct #" + no);
} }
// Get Invoices // Get Invoices

View File

@ -135,7 +135,7 @@ public class TransactionXRef extends SvrProcess
// //
int no = DB.executeUpdate(sql.toString(), get_TrxName()); int no = DB.executeUpdate(sql.toString(), get_TrxName());
log.fine(sql.toString()); log.fine(sql.toString());
log.config("#" + no); if (log.isLoggable(Level.CONFIG)) log.config("#" + no);
// Multi-Level // Multi-Level

View File

@ -116,7 +116,7 @@ public class TranslationDocSync extends SvrProcess
String baseTable = table.getTableName(); String baseTable = table.getTableName();
baseTable = baseTable.substring(0, baseTable.length()-4); baseTable = baseTable.substring(0, baseTable.length()-4);
log.config(baseTable + ": " + sql); if (log.isLoggable(Level.CONFIG)) log.config(baseTable + ": " + sql);
String columnNames = sql.toString(); String columnNames = sql.toString();
sql = new StringBuilder(); sql = new StringBuilder();

View File

@ -587,7 +587,7 @@ public class Doc_AllocationHdr extends Doc
double percent = invoice.getGrandTotal().doubleValue() / allocationSource.doubleValue(); double percent = invoice.getGrandTotal().doubleValue() / allocationSource.doubleValue();
if (percent > 0.99 && percent < 1.01) if (percent > 0.99 && percent < 1.01)
percent = 1.0; 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); + " - Allocation Source=" + allocationSource);
// Get Invoice Postings // Get Invoice Postings
@ -595,7 +595,7 @@ public class Doc_AllocationHdr extends Doc
MInvoice.Table_ID, invoice.getC_Invoice_ID(), getTrxName()); MInvoice.Table_ID, invoice.getC_Invoice_ID(), getTrxName());
docInvoice.loadDocumentDetails(); docInvoice.loadDocumentDetails();
allocationAccounted = docInvoice.createFactCash(as, fact, new BigDecimal(percent)); 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 // Cash Based Commitment Release
if (as.isCreatePOCommitment() && !invoice.isSOTrx()) if (as.isCreatePOCommitment() && !invoice.isSOTrx())

View File

@ -871,7 +871,7 @@ public class Doc_Invoice extends Doc
// end AZ // end AZ
} }
log.config("Created #" + lcas.length); if (log.isLoggable(Level.CONFIG)) log.config("Created #" + lcas.length);
return true; return true;
} // landedCosts } // landedCosts

View File

@ -20,6 +20,7 @@ import java.math.BigDecimal;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.Iterator; import java.util.Iterator;
import java.util.logging.Level;
import org.compiere.model.MAccount; import org.compiere.model.MAccount;
import org.compiere.model.MAcctSchema; import org.compiere.model.MAcctSchema;
@ -55,7 +56,7 @@ public final class Fact
// Fix [ 1884676 ] Fact not setting transaction // Fix [ 1884676 ] Fact not setting transaction
m_trxName = document.getTrxName(); m_trxName = document.getTrxName();
// //
log.config(toString()); if (log.isLoggable(Level.CONFIG)) log.config(toString());
} // Fact } // Fact

View File

@ -868,7 +868,7 @@ public class CConnection implements Serializable, Cloneable
if (isDataSource()) if (isDataSource())
m_info[1] += " - via DataSource"; m_info[1] += " - via DataSource";
m_info[1] = m_info[1].replace ('\n', ' '); 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) if (getFwHost() == null || getFwHost().length () == 0)
setViaFirewall (false); setViaFirewall (false);
m_version = svr.getDateVersion (); m_version = svr.getDateVersion ();
log.config("Server=" + getDbHost() + ", DB=" + getDbName()); if (log.isLoggable(Level.CONFIG)) log.config("Server=" + getDbHost() + ", DB=" + getDbName());
} // update Info } // update Info
/** /**

View File

@ -552,7 +552,7 @@ public class CreateAdempiere
rs = null; pstmt = null; rs = null; pstmt = null;
} }
long elapsed = System.currentTimeMillis() - start; long elapsed = System.currentTimeMillis() - start;
log.config("Inserted=" + count + " - Errors=" + errors if (log.isLoggable(Level.CONFIG)) log.config("Inserted=" + count + " - Errors=" + errors
+ " - " + elapsed + " ms"); + " - " + elapsed + " ms");
return success; return success;
} // createTableData } // createTableData

View File

@ -45,12 +45,15 @@ public class JDBCInfo
{ {
m_md = conn.getMetaData(); m_md = conn.getMetaData();
log.info(m_md.getDatabaseProductName()); 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.config(m_md.getDatabaseMajorVersion() + "/" + m_md.getDatabaseMinorVersion());
// //
log.info(m_md.getDriverName()); log.info(m_md.getDriverName());
log.config(m_md.getDriverVersion()); if (log.isLoggable(Level.CONFIG)){
log.config(m_md.getDriverMajorVersion() + "/" + m_md.getDriverMinorVersion()); log.config(m_md.getDriverVersion());
log.config(m_md.getDriverMajorVersion() + "/" + m_md.getDriverMinorVersion());
}
// //
// log.info("JDBC = " + m_md.getJDBCMajorVersion() + "/" + m_md.getJDBCMinorVersion()); // log.info("JDBC = " + m_md.getJDBCMajorVersion() + "/" + m_md.getJDBCMinorVersion());
} // JDBCInfo } // JDBCInfo

View File

@ -361,7 +361,7 @@ public final class ImpFormat
public String[] parseLine (String line, boolean withLabel, boolean trace, boolean ignoreEmpty) public String[] parseLine (String line, boolean withLabel, boolean trace, boolean ignoreEmpty)
{ {
if (trace) if (trace)
log.config("" + line); if (log.isLoggable(Level.CONFIG)) log.config("" + line);
ArrayList<String> list = new ArrayList<String>(); ArrayList<String> list = new ArrayList<String>();
// for all columns // for all columns

View File

@ -17,6 +17,7 @@
package org.compiere.interfaces.impl; package org.compiere.interfaces.impl;
import java.util.Properties; import java.util.Properties;
import java.util.logging.Level;
import org.adempiere.util.ProcessUtil; import org.adempiere.util.ProcessUtil;
import org.compiere.acct.Doc; import org.compiere.acct.Doc;
@ -116,7 +117,7 @@ public class ServerBean implements Server
*/ */
public int cacheReset (Properties ctx, String tableName, int Record_ID) 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); return CacheMgt.get().reset(tableName, Record_ID);
} // cacheReset } // cacheReset

View File

@ -280,7 +280,7 @@ public class AttachmentFileSystem implements IAttachmentStore {
} }
} }
attach.m_items.remove(index); 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; return true;
} }

View File

@ -161,7 +161,7 @@ public class GridField
{ {
if (!isLookup()) if (!isLookup())
return; 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) if (DisplayType.isLookup(m_vo.displayType) && m_vo.IsDisplayed)
{ {
@ -1259,7 +1259,7 @@ public class GridField
else else
m_parentValue = Boolean.valueOf(m_vo.ColumnName.equals(LinkColumnName)); m_parentValue = Boolean.valueOf(m_vo.ColumnName.equals(LinkColumnName));
if (m_parentValue) 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 + " - Link(" + LinkColumnName + ", W=" + m_vo.WindowNo + ",T=" + m_vo.TabNo
+ ") = " + m_vo.ColumnName); + ") = " + m_vo.ColumnName);
else else
@ -1780,7 +1780,7 @@ public class GridField
if (m_vo.ColumnName.equals(linkColumn)) if (m_vo.ColumnName.equals(linkColumn))
{ {
result = true; result = true;
log.config(result if (log.isLoggable(Level.CONFIG)) log.config(result
+ " - Link(" + linkColumn + ", W=" + m_vo.WindowNo + ",T=" + m_vo.TabNo + " - Link(" + linkColumn + ", W=" + m_vo.WindowNo + ",T=" + m_vo.TabNo
+ ") = " + m_vo.ColumnName); + ") = " + m_vo.ColumnName);
} }

View File

@ -1564,7 +1564,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
if (parsed.length() == 0) if (parsed.length() == 0)
return true; return true;
boolean retValue = Evaluator.evaluateLogic(this, dl); 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; return retValue;
} // isDisplayed } // isDisplayed

View File

@ -1395,7 +1395,7 @@ public class GridTable extends AbstractTableModel
// no need - not changed - row not positioned - no Value changed // no need - not changed - row not positioned - no Value changed
if (m_rowChanged == -1) 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; // return SAVE_ERROR;
if (!manualCmd) if (!manualCmd)
return SAVE_OK; return SAVE_OK;
@ -3444,7 +3444,7 @@ public class GridTable extends AbstractTableModel
*/ */
private void close() private void close()
{ {
// log.config( "MTable Loader.close"); //log.config( "MTable Loader.close");
DB.close(m_rs, m_pstmt); DB.close(m_rs, m_pstmt);
m_rs = null; m_rs = null;
m_pstmt = null; m_pstmt = null;

View File

@ -82,7 +82,7 @@ public class GridWindow implements Serializable
*/ */
public static GridWindow get (Properties ctx, int WindowNo, int AD_Window_ID, boolean virtual) 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); GridWindowVO mWindowVO = GridWindowVO.create (Env.getCtx(), WindowNo, AD_Window_ID);
if (mWindowVO == null) if (mWindowVO == null)
return null; return null;

View File

@ -18,6 +18,7 @@ package org.compiere.model;
import java.sql.ResultSet; import java.sql.ResultSet;
import java.util.Properties; import java.util.Properties;
import java.util.logging.Level;
import org.compiere.impexp.BankStatementLoaderInterface; import org.compiere.impexp.BankStatementLoaderInterface;
@ -203,56 +204,56 @@ import org.compiere.impexp.BankStatementLoaderInterface;
return result; return result;
} }
// Bank Account fields // 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()); 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()); imp.setRoutingNo(m_loader.getRoutingNo());
// Statement fields // Statement fields
log.config( "MBankStatementLoader.importLine EFT Statement Reference No=" + m_loader.getStatementReference()); if (log.isLoggable(Level.CONFIG))log.config( "MBankStatementLoader.importLine EFT Statement Reference No=" + m_loader.getStatementReference());
imp.setEftStatementReference(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()); imp.setEftStatementDate(m_loader.getStatementDate());
log.config( "MBankStatementLoader.importLine Statement Date=" + m_loader.getStatementDate()); if (log.isLoggable(Level.CONFIG))log.config( "MBankStatementLoader.importLine Statement Date=" + m_loader.getStatementDate());
imp.setStatementDate(m_loader.getStatementDate()); imp.setStatementDate(m_loader.getStatementDate());
// Statement Line fields // 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()); 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.setStatementLineDate(m_loader.getStatementLineDate()); imp.setStatementLineDate(m_loader.getStatementLineDate());
imp.setEftStatementLineDate(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.setValutaDate(m_loader.getValutaDate());
imp.setEftValutaDate(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.setStmtAmt(m_loader.getStmtAmt());
imp.setEftAmt(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()); 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()); 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.setReferenceNo(m_loader.getReference());
imp.setEftReference(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()); 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.setMemo(m_loader.getMemo());
imp.setEftMemo(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()); 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()); 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()); 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.setEftCurrency(m_loader.getCurrency());
imp.setISO_Code(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()); 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.setChargeAmt(m_loader.getChargeAmt());
imp.setProcessed(false); imp.setProcessed(false);
imp.setI_IsImported(false); imp.setI_IsImported(false);

View File

@ -20,6 +20,7 @@ import java.awt.Color;
import java.sql.ResultSet; import java.sql.ResultSet;
import java.sql.SQLException; import java.sql.SQLException;
import java.util.Properties; import java.util.Properties;
import java.util.logging.Level;
/** /**
* Color Persistent Object Model * Color Persistent Object Model
@ -68,7 +69,7 @@ public class MColor extends X_AD_Color
*/ */
protected Object loadSpecial (ResultSet rs, int index) throws SQLException 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")) if (index == get_ColumnIndex("ColorType"))
return rs.getString(index+1); return rs.getString(index+1);
return null; return null;

View File

@ -369,7 +369,7 @@ public class MGoal extends X_PA_Goal
*/ */
public boolean updateGoal(boolean force) 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()); MMeasure measure = MMeasure.get(getCtx(), getPA_Measure_ID());
if (force if (force
|| getDateLastRun() == null || getDateLastRun() == null

View File

@ -284,7 +284,7 @@ public class MImage extends X_AD_Image
} }
catch (Exception e) catch (Exception e)
{ {
log.config (e.toString()); if (log.isLoggable(Level.CONFIG)) log.config (e.toString());
} }
return data; return data;
} // getData } // getData

View File

@ -1814,7 +1814,7 @@ public class MInOut extends X_M_InOut implements DocAction
{ {
int no = MInOutLineMA.deleteInOutLineMA(line.getM_InOutLine_ID(), get_TrxName()); int no = MInOutLineMA.deleteInOutLineMA(line.getM_InOutLine_ID(), get_TrxName());
if (no > 0) if (no > 0)
log.config("Delete old #" + no); if (log.isLoggable(Level.CONFIG)) log.config("Delete old #" + no);
// Incoming Trx // Incoming Trx
String MovementType = getMovementType(); String MovementType = getMovementType();
@ -1861,7 +1861,7 @@ public class MInOut extends X_M_InOut implements DocAction
asi = MAttributeSetInstance.create(getCtx(), product, get_TrxName()); asi = MAttributeSetInstance.create(getCtx(), product, get_TrxName());
} }
line.setM_AttributeSetInstance_ID(asi.getM_AttributeSetInstance_ID()); 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; needSave = true;
} }
// Create consume the Attribute Set Instance using policy FIFO/LIFO // Create consume the Attribute Set Instance using policy FIFO/LIFO

View File

@ -22,6 +22,7 @@ import java.sql.ResultSet;
import java.sql.Timestamp; import java.sql.Timestamp;
import java.util.List; import java.util.List;
import java.util.Properties; import java.util.Properties;
import java.util.logging.Level;
import org.compiere.process.DocAction; import org.compiere.process.DocAction;
import org.compiere.process.DocumentEngine; 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()); int no = MInventoryLineMA.deleteInventoryLineMA(line.getM_InventoryLine_ID(), get_TrxName());
if (no > 0) if (no > 0)
log.config("Delete old #" + no); if (log.isLoggable(Level.CONFIG)) log.config("Delete old #" + no);
// Check Line // Check Line
boolean needSave = false; boolean needSave = false;

View File

@ -1212,7 +1212,7 @@ public class MInvoiceLine extends X_C_InvoiceLine
{ {
largestAmtAllocation.setAmt(largestAmtAllocation.getAmt().add(difference)); largestAmtAllocation.setAmt(largestAmtAllocation.getAmt().add(difference));
largestAmtAllocation.saveEx(); largestAmtAllocation.saveEx();
log.config("Difference=" + difference if (log.isLoggable(Level.CONFIG)) log.config("Difference=" + difference
+ ", C_LandedCostAllocation_ID=" + largestAmtAllocation.getC_LandedCostAllocation_ID() + ", C_LandedCostAllocation_ID=" + largestAmtAllocation.getC_LandedCostAllocation_ID()
+ ", Amt" + largestAmtAllocation.getAmt()); + ", Amt" + largestAmtAllocation.getAmt());
} }

View File

@ -262,7 +262,7 @@ public class MLdapProcessor extends X_AD_LdapProcessor implements AdempiereProce
error = new StringBuilder("@NotFound@ O=").append(o); error = new StringBuilder("@NotFound@ O=").append(o);
ldapUser.setErrorString(error.toString()); ldapUser.setErrorString(error.toString());
m_error++; m_error++;
log.config (error.toString()); if (log.isLoggable(Level.CONFIG)) log.config (error.toString());
return ldapUser; return ldapUser;
} }
// Optional Interest Area // Optional Interest Area
@ -275,7 +275,7 @@ public class MLdapProcessor extends X_AD_LdapProcessor implements AdempiereProce
error = new StringBuilder("@NotFound@ OU=").append(ou); error = new StringBuilder("@NotFound@ OU=").append(ou);
ldapUser.setErrorString(error.toString()); ldapUser.setErrorString(error.toString());
m_error++; m_error++;
log.config (error.toString()); if (log.isLoggable(Level.CONFIG)) log.config (error.toString());
return ldapUser; return ldapUser;
} }
} }

View File

@ -825,7 +825,7 @@ public class MMatchPO extends X_M_MatchPO
.divide(Env.ONEHUNDRED, 2, BigDecimal.ROUND_HALF_UP); .divide(Env.ONEHUNDRED, 2, BigDecimal.ROUND_HALF_UP);
difference = difference.abs(); difference = difference.abs();
boolean ok = difference.compareTo(maxTolerance) <= 0; boolean ok = difference.compareTo(maxTolerance) <= 0;
log.config("Difference=" + getPriceMatchDifference() if (log.isLoggable(Level.CONFIG)) log.config("Difference=" + getPriceMatchDifference()
+ ", Max=" + maxTolerance + " => " + ok); + ", Max=" + maxTolerance + " => " + ok);
setIsApproved(ok); setIsApproved(ok);
} }

View File

@ -22,6 +22,7 @@ import java.sql.ResultSet;
import java.sql.Timestamp; import java.sql.Timestamp;
import java.util.List; import java.util.List;
import java.util.Properties; import java.util.Properties;
import java.util.logging.Level;
import org.compiere.process.DocAction; import org.compiere.process.DocAction;
import org.compiere.process.DocumentEngine; 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()); int no = MMovementLineMA.deleteMovementLineMA(line.getM_MovementLine_ID(), get_TrxName());
if (no > 0) if (no > 0)
log.config("Delete old #" + no); if (log.isLoggable(Level.CONFIG)) log.config("Delete old #" + no);
boolean needSave = false; boolean needSave = false;

View File

@ -24,6 +24,7 @@ import java.sql.Timestamp;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Properties; import java.util.Properties;
import java.util.logging.Level;
import org.adempiere.exceptions.DBException; import org.adempiere.exceptions.DBException;
import org.compiere.util.CLogger; import org.compiere.util.CLogger;
@ -1162,7 +1163,7 @@ public class MRequest extends X_R_Request
if (X_AD_User.NOTIFICATIONTYPE_None.equals(NotificationType)) if (X_AD_User.NOTIFICATIONTYPE_None.equals(NotificationType))
{ {
log.config("Opt out: " + Name); if (log.isLoggable(Level.CONFIG)) log.config("Opt out: " + Name);
continue; continue;
} }
if ((X_AD_User.NOTIFICATIONTYPE_EMail.equals(NotificationType) 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; NotificationType = X_AD_User.NOTIFICATIONTYPE_Notice;
else else
{ {
log.config("No EMail: " + Name); if (log.isLoggable(Level.CONFIG)) log.config("No EMail: " + Name);
continue; continue;
} }
} }
if (X_AD_User.NOTIFICATIONTYPE_Notice.equals(NotificationType) if (X_AD_User.NOTIFICATIONTYPE_Notice.equals(NotificationType)
&& AD_Role_ID >= 0) && AD_Role_ID >= 0)
{ {
log.config("No internal User: " + Name); if (log.isLoggable(Level.CONFIG)) log.config("No internal User: " + Name);
continue; continue;
} }

View File

@ -90,7 +90,7 @@ public final class NaturalAccountMap<K,V> extends CCache<K,V>
*/ */
public String parseFile (File file) public String parseFile (File file)
{ {
log.config(file.getAbsolutePath()); if (log.isLoggable(Level.CONFIG)) log.config(file.getAbsolutePath());
String line = null; String line = null;
try try
{ {
@ -142,7 +142,7 @@ public final class NaturalAccountMap<K,V> extends CCache<K,V>
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
public String parseLine (String line, int lineNo) throws Exception 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) { if (line.trim().length()==0) {
log.log(Level.WARNING, "Line "+lineNo+" is empty, ignored. "); log.log(Level.WARNING, "Line "+lineNo+" is empty, ignored. ");

View File

@ -110,7 +110,7 @@ public class PO_Record
.append(" WHERE AD_Table_ID=? AND Record_ID=?"); .append(" WHERE AD_Table_ID=? AND Record_ID=?");
int no = DB.executeUpdate(sql.toString(), params, false, trxName); int no = DB.executeUpdate(sql.toString(), params, false, trxName);
if (no > 0) 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) else if (no < 0)
{ {
log.severe(s_cascadeNames[i] + " (" + AD_Table_ID + "/" + Record_ID + ") #" + no); 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=?)"); .append(s_parentNames[j]).append("_ID=?)");
int no = DB.executeUpdate(sql.toString(), params, false, trxName); int no = DB.executeUpdate(sql.toString(), params, false, trxName);
if (no > 0) 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); + " (" + AD_Table_ID + "/" + Record_ID + ") #" + no);
else if (no < 0) else if (no < 0)
{ {
@ -230,7 +230,7 @@ public class PO_Record
.append(TableName).append("_ID FROM ").append(TableName).append(")"); .append(TableName).append("_ID FROM ").append(TableName).append(")");
int no = DB.executeUpdate(sql.toString(), null); int no = DB.executeUpdate(sql.toString(), null);
if (no > 0) 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); + ") Invalid #" + no);
} }
} // validate } // validate

View File

@ -102,7 +102,7 @@ public class ScheduleUtil
Timestamp start_Date, Timestamp end_Date, Timestamp start_Date, Timestamp end_Date,
BigDecimal qty, boolean getAll, String trxName) 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) if (m_S_Resource_ID != S_Resource_ID)
getBaseInfo (S_Resource_ID); getBaseInfo (S_Resource_ID);
// //
@ -804,7 +804,7 @@ public class ScheduleUtil
@SuppressWarnings("unused") @SuppressWarnings("unused")
MUOM uom = MUOM.get (m_ctx, m_C_UOM_ID); MUOM uom = MUOM.get (m_ctx, m_C_UOM_ID);
int minutes = MUOMConversion.convertToMinutes (m_ctx, m_C_UOM_ID, Env.ONE); 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) if (minutes > 0 && minutes < 60*24)
{ {

View File

@ -147,7 +147,7 @@ public class Scriptlet
try try
{ {
m_result = i.get (m_variable); 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) catch (Exception e)
{ {

View File

@ -21,6 +21,7 @@ import java.sql.ResultSet;
import java.sql.SQLException; import java.sql.SQLException;
import java.sql.Timestamp; import java.sql.Timestamp;
import java.util.Properties; import java.util.Properties;
import java.util.logging.Level;
import org.adempiere.exceptions.DBException; import org.adempiere.exceptions.DBException;
import org.adempiere.exceptions.TaxCriteriaNotFoundException; import org.adempiere.exceptions.TaxCriteriaNotFoundException;
@ -482,7 +483,7 @@ public class Tax
{ {
log.info("get(Detail) - Category=" + C_TaxCategory_ID log.info("get(Detail) - Category=" + C_TaxCategory_ID
+ ", SOTrx=" + IsSOTrx); + ", 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); + ", BillTo=" + billToC_Location_ID + ", BillDate=" + billDate);
} }

View File

@ -575,7 +575,7 @@ public class PrintData implements Serializable
if (pd.getColumnInfo() != null) if (pd.getColumnInfo() != null)
{ {
for (int i = 0; i < pd.getColumnInfo().length; i++) 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 } // dump
@ -610,10 +610,10 @@ public class PrintData implements Serializable
} }
else if (obj instanceof PrintDataElement) else if (obj instanceof PrintDataElement)
{ {
log.config(((PrintDataElement)obj).toStringX()); if (log.isLoggable(Level.CONFIG)) log.config(((PrintDataElement)obj).toStringX());
} }
else else
log.config("- INVALID: " + obj); if (log.isLoggable(Level.CONFIG)) log.config("- INVALID: " + obj);
} }
} // dumpRow } // dumpRow
@ -752,7 +752,7 @@ public class PrintData implements Serializable
*/ */
public static PrintData parseXML (Properties ctx, File input) public static PrintData parseXML (Properties ctx, File input)
{ {
log.config(input.toString()); if (log.isLoggable(Level.CONFIG)) log.config(input.toString());
PrintData pd = null; PrintData pd = null;
try try
{ {

View File

@ -97,7 +97,7 @@ public class PrintFormatUtil
*/ */
public int addMissingColumns (MPrintFormat pf) 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 " String sql = "SELECT c.AD_Column_ID, c.ColumnName "
+ "FROM AD_Column c " + "FROM AD_Column c "
+ "WHERE NOT EXISTS " + "WHERE NOT EXISTS "

View File

@ -541,7 +541,7 @@ public class PrintUtil
*/ */
public static void setupPrintForm (int AD_Client_ID) 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(); Properties ctx = Env.getCtx();
CLogMgt.enable(false); CLogMgt.enable(false);
// //

View File

@ -1189,7 +1189,7 @@ public class TableElement extends PrintElement
int pageXindex = getPageXIndex(pageIndex); int pageXindex = getPageXIndex(pageIndex);
int pageYindex = getPageYIndex(pageIndex); int pageYindex = getPageYIndex(pageIndex);
if (DEBUG_PRINT) 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 firstColumn = ((Integer)m_firstColumnOnPage.get(pageXindex)).intValue();
int nextPageColumn = m_columnHeader.length; // no of cols int nextPageColumn = m_columnHeader.length; // no of cols

View File

@ -146,7 +146,7 @@ public class MReportLine extends X_PA_ReportLine
ColumnName = col; ColumnName = col;
else if (!ColumnName.equals(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; return null;
} }
} }

View File

@ -19,6 +19,7 @@ package org.compiere.report.core;
import java.io.Serializable; import java.io.Serializable;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Properties; import java.util.Properties;
import java.util.logging.Level;
import org.compiere.util.CLogger; import org.compiere.util.CLogger;
@ -222,7 +223,7 @@ public class RModel implements Serializable
*/ */
public void setGroup (int col) 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()) if (col < 0 || col >= m_data.cols.size())
return; return;
Integer ii = new Integer(col); Integer ii = new Integer(col);
@ -258,7 +259,7 @@ public class RModel implements Serializable
*/ */
public void setFunction (int col, String function) 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()) if (col < 0 || col >= m_data.cols.size())
return; return;
m_data.functions.put(new Integer(col), function); m_data.functions.put(new Integer(col), function);

View File

@ -470,7 +470,7 @@ public class CLogMgt
String key = pp[i].toString(); String key = pp[i].toString();
String value = p.getProperty(key); String value = p.getProperty(key);
if (logIt) if (logIt)
log.config(key + "=" + value); if (log.isLoggable(Level.CONFIG)) log.config(key + "=" + value);
else else
System.out.println(" " + key + " = " + value); System.out.println(" " + key + " = " + value);
} }

View File

@ -272,7 +272,7 @@ public final class DB
s_cc.setDataSource(); 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(); // Trace.printStack();
} // setDBTarget } // setDBTarget

View File

@ -24,6 +24,7 @@ import java.text.SimpleDateFormat;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.Locale; import java.util.Locale;
import java.util.logging.Level;
import java.util.logging.Logger; import java.util.logging.Logger;
import javax.print.attribute.standard.MediaSize; import javax.print.attribute.standard.MediaSize;
@ -421,7 +422,7 @@ public class Language implements Serializable
if (language != null) if (language != null)
{ {
Env.setContext(Env.getCtx(), Env.LANGUAGE, language.getAD_Language()); Env.setContext(Env.getCtx(), Env.LANGUAGE, language.getAD_Language());
log.config(language.toString()); if (log.isLoggable(Level.CONFIG)) log.config(language.toString());
} }
} // setLanguage } // setLanguage
@ -504,7 +505,7 @@ public class Language implements Serializable
if (AD_Language != null) if (AD_Language != null)
{ {
m_AD_Language = AD_Language; m_AD_Language = AD_Language;
log.config(toString()); if (log.isLoggable(Level.CONFIG)) log.config(toString());
} }
} // getAD_Language } // getAD_Language

View File

@ -631,7 +631,7 @@ public class Login
// Do we look for trees? // Do we look for trees?
if (role.getAD_Tree_Org_ID() == 0) 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; return;
} }
// Summary Org - Get Dependents // Summary Org - Get Dependents

View File

@ -19,6 +19,7 @@ package org.compiere.util;
import java.io.UnsupportedEncodingException; import java.io.UnsupportedEncodingException;
import java.security.NoSuchAlgorithmException; import java.security.NoSuchAlgorithmException;
import java.util.Properties; import java.util.Properties;
import java.util.logging.Level;
import java.util.logging.Logger; import java.util.logging.Logger;
/** /**
@ -214,7 +215,7 @@ public class SecureEngine
throw new IllegalStateException(realClass throw new IllegalStateException(realClass
+ ": " + TEST + ": " + TEST
+ "->" + testE + "->" + testC); + "->" + testE + "->" + testC);
log.config (realClass + " initialized - " + implementation); if (log.isLoggable(Level.CONFIG)) log.config (realClass + " initialized - " + implementation);
} // SecureEngine } // SecureEngine

View File

@ -303,8 +303,8 @@ public class WebEnv
*/ */
public static void dump (ServletConfig config) public static void dump (ServletConfig config)
{ {
log.config("ServletConfig " + config.getServletName()); if (log.isLoggable(Level.CONFIG))log.config("ServletConfig " + config.getServletName());
log.config("- Context=" + config.getServletContext()); if (log.isLoggable(Level.CONFIG))log.config("- Context=" + config.getServletContext());
if (!CLogMgt.isLevelFiner()) if (!CLogMgt.isLevelFiner())
return; return;
boolean first = true; boolean first = true;
@ -326,8 +326,8 @@ public class WebEnv
*/ */
public static void dump (ServletContext ctx) public static void dump (ServletContext ctx)
{ {
log.config("ServletContext " + ctx.getServletContextName()); if (log.isLoggable(Level.CONFIG)) log.config("ServletContext " + ctx.getServletContextName());
log.config("- ServerInfo=" + ctx.getServerInfo()); if (log.isLoggable(Level.CONFIG)) log.config("- ServerInfo=" + ctx.getServerInfo());
if (!CLogMgt.isLevelFiner()) if (!CLogMgt.isLevelFiner())
return; return;
boolean first = true; boolean first = true;
@ -360,8 +360,8 @@ public class WebEnv
*/ */
public static void dump (HttpSession session) public static void dump (HttpSession session)
{ {
log.config("Session " + session.getId()); if (log.isLoggable(Level.CONFIG))log.config("Session " + session.getId());
log.config("- Created=" + new Timestamp(session.getCreationTime())); if (log.isLoggable(Level.CONFIG))log.config("- Created=" + new Timestamp(session.getCreationTime()));
if (!CLogMgt.isLevelFiner()) if (!CLogMgt.isLevelFiner())
return; return;
boolean first = true; boolean first = true;
@ -383,7 +383,7 @@ public class WebEnv
*/ */
public static void dump (HttpServletRequest request) 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()) if (!CLogMgt.isLevelFiner())
return; return;
log.finer("- Server=" + request.getServerName() + ", Port=" + request.getServerPort()); log.finer("- Server=" + request.getServerName() + ", Port=" + request.getServerPort());

View File

@ -22,6 +22,7 @@ import java.text.SimpleDateFormat;
import java.util.Enumeration; import java.util.Enumeration;
import java.util.Locale; import java.util.Locale;
import java.util.Properties; import java.util.Properties;
import java.util.logging.Level;
import javax.servlet.ServletContext; import javax.servlet.ServletContext;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
@ -122,7 +123,7 @@ public class WebSessionCtx implements Serializable
String key = (String)en.nextElement(); String key = (String)en.nextElement();
String value = sc.getInitParameter(key); String value = sc.getInitParameter(key);
ctx.setProperty(key, value); ctx.setProperty(key, value);
log.config (key + "=" + value); if (log.isLoggable(Level.CONFIG)) log.config (key + "=" + value);
} }
setWStore (request.getContextPath()); setWStore (request.getContextPath());
@ -157,7 +158,7 @@ public class WebSessionCtx implements Serializable
String key = (String)en.nextElement(); String key = (String)en.nextElement();
String value = sc.getInitParameter(key); String value = sc.getInitParameter(key);
ctx.setProperty(key, value); ctx.setProperty(key, value);
log.config (key + "=" + value); if (log.isLoggable(Level.CONFIG)) log.config (key + "=" + value);
} }
setWStore (W_Store_ID); setWStore (W_Store_ID);

View File

@ -269,7 +269,7 @@ public class WebUser
if (m_loc == null) if (m_loc == null)
m_loc = new MLocation (m_ctx, 0, 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 } // load
/** /**

View File

@ -128,7 +128,7 @@ public class DocWorkflowManager implements DocWorkflowMgr
// //
if (wf.start(pi, document.get_TrxName()) != null) if (wf.start(pi, document.get_TrxName()) != null)
{ {
log.config(wf.getName()); if (log.isLoggable(Level.CONFIG)) log.config(wf.getName());
m_noStarted++; m_noStarted++;
started = true; started = true;
} }

View File

@ -652,7 +652,7 @@ public class ConfigurationData
props.put("mail.store.protocol", "imaps"); 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; Session session = null;
Store store = null; Store store = null;
@ -661,10 +661,10 @@ public class ConfigurationData
EMailAuthenticator auth = new EMailAuthenticator (mailUser, mailPassword); EMailAuthenticator auth = new EMailAuthenticator (mailUser, mailPassword);
session = Session.getDefaultInstance(props, auth); session = Session.getDefaultInstance(props, auth);
session.setDebug (CLogMgt.isLevelFinest()); session.setDebug (CLogMgt.isLevelFinest());
log.config("Session=" + session); if (log.isLoggable(Level.CONFIG)) log.config("Session=" + session);
// Connect to Store // Connect to Store
store = session.getStore(isGmail ? "imaps" : "imap"); store = session.getStore(isGmail ? "imaps" : "imap");
log.config("Store=" + store); if (log.isLoggable(Level.CONFIG)) log.config("Store=" + store);
} }
catch (NoSuchProviderException nsp) catch (NoSuchProviderException nsp)
{ {

View File

@ -189,7 +189,7 @@ public class KeyStoreMgt
*/ */
public Certificate getCertificate (String alias) throws Exception 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); Date date = m_keyStore.getCreationDate(alias);
if (date == null) // no certificate if (date == null) // no certificate

View File

@ -28,6 +28,7 @@ import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
import java.util.ResourceBundle; import java.util.ResourceBundle;
import java.util.logging.Level;
import java.util.logging.Logger; import java.util.logging.Logger;
import javax.swing.ImageIcon; import javax.swing.ImageIcon;
@ -472,7 +473,7 @@ public final class AdempierePLAF
{ {
if (plaf == null) if (plaf == null)
return; return;
log.config(plaf + (theme == null ? "" : (" - " + theme))); if (log.isLoggable(Level.CONFIG)) log.config(plaf + (theme == null ? "" : (" - " + theme)));
// Look & Feel // Look & Feel
Class<?> lafClass = null; Class<?> lafClass = null;
@ -533,7 +534,7 @@ public final class AdempierePLAF
{ {
log.severe(e.getMessage()); log.severe(e.getMessage());
} }
log.config(plaf + " - " + theme); if (log.isLoggable(Level.CONFIG)) log.config(plaf + " - " + theme);
// printPLAFDefaults(); // printPLAFDefaults();
} // setPLAF } // setPLAF

View File

@ -631,7 +631,7 @@ public class AcctViewer extends CFrame
bQuery.setEnabled(false); bQuery.setEnabled(false);
statusLine.setText(" " + Msg.getMsg(Env.getCtx(), "Processing")); statusLine.setText(" " + Msg.getMsg(Env.getCtx(), "Processing"));
log.config(para.toString()); if (log.isLoggable(Level.CONFIG)) log.config(para.toString());
Thread.yield(); Thread.yield();
// Switch to Result pane // Switch to Result pane
@ -674,7 +674,7 @@ public class AcctViewer extends CFrame
{ {
ValueNamePair vp = (ValueNamePair)selTable.getSelectedItem(); ValueNamePair vp = (ValueNamePair)selTable.getSelectedItem();
m_data.AD_Table_ID = ((Integer)m_data.tableInfo.get(vp.getValue())).intValue(); 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 // Reset Record
m_data.Record_ID = 0; m_data.Record_ID = 0;
selRecord.setText(""); selRecord.setText("");
@ -761,7 +761,7 @@ public class AcctViewer extends CFrame
} }
// Save for query // Save for query
log.config(keyColumn + " - " + key); if (log.isLoggable(Level.CONFIG)) log.config(keyColumn + " - " + key);
if (button == selRecord) // Record_ID if (button == selRecord) // Record_ID
m_data.Record_ID = key.intValue(); m_data.Record_ID = key.intValue();
else else

View File

@ -55,7 +55,7 @@ public class AArchive implements ActionListener
public AArchive (JComponent invoker, int AD_Table_ID, int Record_ID) public AArchive (JComponent invoker, int AD_Table_ID, int Record_ID)
{ {
super (); 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_AD_Table_ID = AD_Table_ID;
m_Record_ID = Record_ID; m_Record_ID = Record_ID;
getArchives(invoker); getArchives(invoker);

View File

@ -65,7 +65,7 @@ public class AChat extends CDialog
{ {
super (frame, Msg.getMsg(Env.getCtx(), "Chat") + " " + Description, true); super (frame, Msg.getMsg(Env.getCtx(), "Chat") + " " + Description, true);
// needs to be modal otherwise APanel does not recongize change. // 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); + ", Table=" + AD_Table_ID + ", Record=" + Record_ID);
// //
m_WindowNo = WindowNo; m_WindowNo = WindowNo;

View File

@ -673,7 +673,7 @@ public final class AEnv
AD_Window_ID = PO_Window_ID; 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); AWindow frame = new AWindow(null);
if (!frame.initWindow(AD_Window_ID, MQuery.getEqualQuery(TableName + "_ID", Record_ID))) if (!frame.initWindow(AD_Window_ID, MQuery.getEqualQuery(TableName + "_ID", Record_ID)))
return; return;
@ -737,7 +737,7 @@ public final class AEnv
AD_Window_ID = PO_Window_ID; 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); AWindow frame = new AWindow(null);
if (!frame.initWindow(AD_Window_ID, query)) if (!frame.initWindow(AD_Window_ID, query))
return; return;
@ -817,7 +817,7 @@ public final class AEnv
if (MRole.getDefault().isTableAccess (AD_Table_ID, true)) // RO if (MRole.getDefault().isTableAccess (AD_Table_ID, true)) // RO
s_workflow = Boolean.TRUE; s_workflow = Boolean.TRUE;
else else
log.config(s_workflow.toString()); if (log.isLoggable(Level.CONFIG)) log.config(s_workflow.toString());
} }
// Get Window // Get Window
if (s_workflow.booleanValue()) if (s_workflow.booleanValue())
@ -827,7 +827,7 @@ public final class AEnv
if (s_workflow_Window_ID == 0) if (s_workflow_Window_ID == 0)
s_workflow_Window_ID = 297; // fallback HARDCODED s_workflow_Window_ID = 297; // fallback HARDCODED
// s_workflow = Boolean.FALSE; // 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(); return s_workflow.booleanValue();
@ -902,7 +902,7 @@ public final class AEnv
try try
{ {
s_serverTries++; s_serverTries++;
log.config("try #" + s_serverTries); if (log.isLoggable(Level.CONFIG)) log.config("try #" + s_serverTries);
ok = CConnection.get().isAppsServerOK(true); ok = CConnection.get().isAppsServerOK(true);
if (ok) if (ok)
s_serverTries = 0; s_serverTries = 0;
@ -939,7 +939,7 @@ public final class AEnv
public static String postImmediate (int WindowNo, int AD_Client_ID, public static String postImmediate (int WindowNo, int AD_Client_ID,
int AD_Table_ID, int Record_ID, boolean force) 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 + ", AD_Table_ID=" + AD_Table_ID + "/" + Record_ID
+ ", Force=" + force); + ", Force=" + force);
@ -955,7 +955,7 @@ public final class AEnv
*/ */
public static void cacheReset (String tableName, int Record_ID) 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 // try to get from Server when enabled
if (isServerActive()) if (isServerActive())

View File

@ -95,7 +95,7 @@ public class AExport
return; return;
} }
ext = ext.substring(ext.lastIndexOf('.')+1).toLowerCase(); 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)); parent.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
this.parent = parent; this.parent = parent;

View File

@ -112,7 +112,7 @@ public class AGlassPane extends JPanel implements MouseListener, ActionListener
*/ */
public void setBusyTimer (int time) public void setBusyTimer (int time)
{ {
log.config("Time=" + time); if (log.isLoggable(Level.CONFIG)) log.config("Time=" + time);
// should we display a progress bar? // should we display a progress bar?
if (time < 2 ) if (time < 2 )
{ {

View File

@ -959,7 +959,7 @@ public final class ALogin extends CDialog
KeyNamePair client = (KeyNamePair)clientCombo.getSelectedItem(); KeyNamePair client = (KeyNamePair)clientCombo.getSelectedItem();
if (client == null || m_comboActive) if (client == null || m_comboActive)
return; return;
log.config(": " + client); if (log.isLoggable(Level.CONFIG)) log.config(": " + client);
m_comboActive = true; m_comboActive = true;
// @Trifon - Set Proper "#AD_Client_ID", #AD_User_ID and "#SalesRep_ID" // @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 // 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(); KeyNamePair rol = (KeyNamePair)roleCombo.getSelectedItem();
if (rol == null || m_comboActive) if (rol == null || m_comboActive)
return; return;
log.config(": " + rol); if (log.isLoggable(Level.CONFIG)) log.config(": " + rol);
m_comboActive = true; m_comboActive = true;
if( Env.getContextAsInt(m_ctx, "#AD_Client_ID") > 0 ) if( Env.getContextAsInt(m_ctx, "#AD_Client_ID") > 0 )
@ -1086,7 +1086,7 @@ public final class ALogin extends CDialog
KeyNamePair org = (KeyNamePair)orgCombo.getSelectedItem(); KeyNamePair org = (KeyNamePair)orgCombo.getSelectedItem();
if (org == null || m_comboActive) if (org == null || m_comboActive)
return; return;
log.config(": " + org); if (log.isLoggable(Level.CONFIG)) log.config(": " + org);
m_comboActive = true; m_comboActive = true;
// //
KeyNamePair[] whs = m_login.getWarehouses(org); KeyNamePair[] whs = m_login.getWarehouses(org);
@ -1127,7 +1127,7 @@ public final class ALogin extends CDialog
String version = AEnv.getServerVersion(); String version = AEnv.getServerVersion();
if (Adempiere.DATE_VERSION.equals(version)) if (Adempiere.DATE_VERSION.equals(version))
{ {
log.config("Server = Client - " + version); if (log.isLoggable(Level.CONFIG)) log.config("Server = Client - " + version);
retValue = true; retValue = true;
} }
else if (version != null) else if (version != null)

View File

@ -1509,7 +1509,7 @@ public final class APanel extends CPanel
if (!m_curTab.isReadOnly() if (!m_curTab.isReadOnly()
&& (Env.isAutoNew(m_ctx, m_curWindowNo) || m_curTab.isQueryNewRecord())) && (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()); + " - QueryNew=" + m_curTab.isQueryNewRecord());
m_curTab.dataNew(false); m_curTab.dataNew(false);
} }
@ -1904,7 +1904,7 @@ public final class APanel extends CPanel
*/ */
private void cmd_new (boolean copy) private void cmd_new (boolean copy)
{ {
log.config("copy=" + copy); if (log.isLoggable(Level.CONFIG)) log.config("copy=" + copy);
if (!m_curTab.isInsertRecord()) if (!m_curTab.isInsertRecord())
{ {
log.warning("Insert Record disabled for Tab"); log.warning("Insert Record disabled for Tab");
@ -2066,7 +2066,7 @@ public final class APanel extends CPanel
{ {
if (m_curAPanelTab != null) if (m_curAPanelTab != null)
manualCmd = false; manualCmd = false;
log.config("Manual=" + manualCmd); if (log.isLoggable(Level.CONFIG)) log.config("Manual=" + manualCmd);
m_errorDisplayed = false; m_errorDisplayed = false;
m_curGC.stopEditor(true); m_curGC.stopEditor(true);
m_curGC.acceptEditorChanges(); m_curGC.acceptEditorChanges();
@ -2575,7 +2575,7 @@ public final class APanel extends CPanel
MRole role = MRole.getDefault(); MRole role = MRole.getDefault();
int maxRows = role.getMaxQueryRecords(); int maxRows = role.getMaxQueryRecords();
// //
log.config("OnlyCurrent=" + m_onlyCurrentRows if (log.isLoggable(Level.CONFIG)) log.config("OnlyCurrent=" + m_onlyCurrentRows
+ ", Days=" + m_onlyCurrentDays + ", Days=" + m_onlyCurrentDays
+ ", MaxRows=" + maxRows); + ", MaxRows=" + maxRows);
m_curGC.query(m_onlyCurrentRows, m_onlyCurrentDays, maxRows ); // autoSize m_curGC.query(m_onlyCurrentRows, m_onlyCurrentDays, maxRows ); // autoSize
@ -2811,7 +2811,7 @@ public final class APanel extends CPanel
* or invoke user form * 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 (processID == 0)
{ {
if (isProcessMandatory) 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); X_AD_ToolBarButton tbt = new X_AD_ToolBarButton(m_ctx, ToolBarButton_ID, null);
String restrictName = tbt.getComponentName(); 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; boolean found=false;
// remove from ToolBar // remove from ToolBar

View File

@ -72,7 +72,7 @@ public class ARequest implements ActionListener
int C_BPartner_ID) int C_BPartner_ID)
{ {
super (); 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_AD_Table_ID = AD_Table_ID;
m_Record_ID = Record_ID; m_Record_ID = Record_ID;
m_C_BPartner_ID = C_BPartner_ID; m_C_BPartner_ID = C_BPartner_ID;

View File

@ -20,6 +20,7 @@ import java.awt.BorderLayout;
import java.awt.GraphicsConfiguration; import java.awt.GraphicsConfiguration;
import java.awt.Image; import java.awt.Image;
import java.awt.event.WindowEvent; import java.awt.event.WindowEvent;
import java.util.logging.Level;
import org.compiere.model.MQuery; import org.compiere.model.MQuery;
import org.compiere.swing.CFrame; import org.compiere.swing.CFrame;
@ -130,7 +131,7 @@ public class AWindow extends CFrame
{ {
if (busy == m_glassPane.isVisible()) if (busy == m_glassPane.isVisible())
return; return;
log.config(getName() + " - " + busy); if (log.isLoggable(Level.CONFIG)) log.config(getName() + " - " + busy);
m_glassPane.setMessage(null); m_glassPane.setMessage(null);
m_glassPane.setVisible(busy); m_glassPane.setVisible(busy);
if (busy) if (busy)

View File

@ -79,7 +79,7 @@ public final class Attachment extends CDialog
{ {
super (frame, Msg.getMsg(Env.getCtx(), "Attachment"), true); super (frame, Msg.getMsg(Env.getCtx(), "Attachment"), true);
// needs to be modal otherwise APanel does not recognize change. // 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); + ", Table=" + AD_Table_ID + ", Record=" + Record_ID);
// //
m_WindowNo = WindowNo; m_WindowNo = WindowNo;
@ -260,7 +260,7 @@ public final class Attachment extends CDialog
private void displayData (int index) private void displayData (int index)
{ {
MAttachmentEntry entry = m_attachment.getEntry(index); MAttachmentEntry entry = m_attachment.getEntry(index);
log.config("Index=" + index + " - " + entry); if (log.isLoggable(Level.CONFIG)) log.config("Index=" + index + " - " + entry);
// Reset UI // Reset UI
gifPanel.setImage(null); gifPanel.setImage(null);
@ -281,7 +281,7 @@ public final class Attachment extends CDialog
bOpen.setEnabled(true); bOpen.setEnabled(true);
bSave.setEnabled(true); bSave.setEnabled(true);
bDelete.setEnabled(true); bDelete.setEnabled(true);
log.config(entry.toStringX()); if (log.isLoggable(Level.CONFIG)) log.config(entry.toStringX());
// //
info.setText(entry.toStringX()); info.setText(entry.toStringX());
if (entry.isPDF() && pdfViewer != null) if (entry.isPDF() && pdfViewer != null)
@ -329,7 +329,7 @@ public final class Attachment extends CDialog
graphPanel.add(info, BorderLayout.CENTER); graphPanel.add(info, BorderLayout.CENTER);
} }
log.config("Size=" + size); if (log.isLoggable(Level.CONFIG)) log.config("Size=" + size);
// graphPanel.setPreferredSize(size); // graphPanel.setPreferredSize(size);
// centerPane.setDividerLocation(size.width+30); // centerPane.setDividerLocation(size.width+30);
// size.width += 100; // size.width += 100;
@ -509,7 +509,7 @@ public final class Attachment extends CDialog
String fileName = getFileName(index); String fileName = getFileName(index);
String ext = fileName.substring (fileName.lastIndexOf('.')); String ext = fileName.substring (fileName.lastIndexOf('.'));
log.config( "Ext=" + ext); if (log.isLoggable(Level.CONFIG)) log.config( "Ext=" + ext);
JFileChooser chooser = new JFileChooser(); JFileChooser chooser = new JFileChooser();
chooser.setDialogType(JFileChooser.SAVE_DIALOG); chooser.setDialogType(JFileChooser.SAVE_DIALOG);
@ -524,7 +524,7 @@ public final class Attachment extends CDialog
if (saveFile == null) if (saveFile == null)
return; return;
log.config("Save to " + saveFile.getAbsolutePath()); if (log.isLoggable(Level.CONFIG)) log.config("Save to " + saveFile.getAbsolutePath());
m_attachment.getEntryFile(index, saveFile); m_attachment.getEntryFile(index, saveFile);
} // saveAttachmentToFile } // saveAttachmentToFile

View File

@ -62,7 +62,7 @@ public class ScreenShot
File file = getJPGFile (window); File file = getJPGFile (window);
if (file == null) if (file == null)
return false; return false;
log.config("File=" + file); if (log.isLoggable(Level.CONFIG)) log.config("File=" + file);
if (file.exists()) if (file.exists())
file.delete(); file.delete();

View File

@ -311,7 +311,7 @@ public class ArchiveViewer extends Archive
private void updateQDisplay() private void updateQDisplay()
{ {
boolean reports = reportField.isSelected(); boolean reports = reportField.isSelected();
log.config("Reports=" + reports); if (log.isLoggable(Level.CONFIG)) log.config("Reports=" + reports);
// Show // Show
processLabel.setVisible(reports); processLabel.setVisible(reports);
processField.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) 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); reportField.setSelected(isReport);
m_AD_Table_ID = AD_Table_ID; m_AD_Table_ID = AD_Table_ID;
m_Record_ID = Record_ID; m_Record_ID = Record_ID;

View File

@ -353,7 +353,7 @@ public class VAllocation extends Allocation
{ {
String name = e.getPropertyName(); String name = e.getPropertyName();
Object value = e.getNewValue(); Object value = e.getNewValue();
log.config(name + "=" + value); if (log.isLoggable(Level.CONFIG)) log.config(name + "=" + value);
if (value == null) if (value == null)
return; return;

View File

@ -299,7 +299,7 @@ public class VBOMDrop extends CPanel
*/ */
private void createMainPanel () private void createMainPanel ()
{ {
log.config(": " + m_product); if (log.isLoggable(Level.CONFIG)) log.config(": " + m_product);
this.removeAll(); this.removeAll();
this.setPreferredSize(null); this.setPreferredSize(null);
this.invalidate(); this.invalidate();
@ -453,7 +453,7 @@ public class VBOMDrop extends CPanel
*/ */
public void actionPerformed (ActionEvent e) public void actionPerformed (ActionEvent e)
{ {
log.config(e.getActionCommand()); if (log.isLoggable(Level.CONFIG)) log.config(e.getActionCommand());
Object source = e.getSource(); Object source = e.getSource();
@ -623,7 +623,7 @@ public class VBOMDrop extends CPanel
*/ */
private boolean cmd_saveOrder (int C_Order_ID) 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); MOrder order = new MOrder (Env.getCtx(), C_Order_ID, null);
if (order.get_ID() == 0) if (order.get_ID() == 0)
{ {
@ -652,7 +652,7 @@ public class VBOMDrop extends CPanel
} // line selected } // line selected
} // for all bom lines } // for all bom lines
log.config("#" + lineCount); if (log.isLoggable(Level.CONFIG)) log.config("#" + lineCount);
return true; return true;
} // cmd_saveOrder } // cmd_saveOrder
@ -663,7 +663,7 @@ public class VBOMDrop extends CPanel
*/ */
private boolean cmd_saveInvoice (int C_Invoice_ID) 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); MInvoice invoice = new MInvoice (Env.getCtx(), C_Invoice_ID, null);
if (invoice.get_ID() == 0) if (invoice.get_ID() == 0)
{ {
@ -692,7 +692,7 @@ public class VBOMDrop extends CPanel
} // line selected } // line selected
} // for all bom lines } // for all bom lines
log.config("#" + lineCount); if (log.isLoggable(Level.CONFIG)) log.config("#" + lineCount);
return true; return true;
} // cmd_saveInvoice } // cmd_saveInvoice
@ -703,7 +703,7 @@ public class VBOMDrop extends CPanel
*/ */
private boolean cmd_saveProject (int C_Project_ID) 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); MProject project = new MProject (Env.getCtx(), C_Project_ID, null);
if (project.get_ID() == 0) if (project.get_ID() == 0)
{ {
@ -731,7 +731,7 @@ public class VBOMDrop extends CPanel
} // line selected } // line selected
} // for all bom lines } // for all bom lines
log.config("#" + lineCount); if (log.isLoggable(Level.CONFIG)) log.config("#" + lineCount);
return true; return true;
} // cmd_saveProject } // cmd_saveProject

View File

@ -312,7 +312,7 @@ public class VFileImport extends CPanel
if (chooser.showOpenDialog(this) != JFileChooser.APPROVE_OPTION) if (chooser.showOpenDialog(this) != JFileChooser.APPROVE_OPTION)
return; return;
m_file = chooser.getSelectedFile(); m_file = chooser.getSelectedFile();
log.config(m_file.getName()); if (log.isLoggable(Level.CONFIG)) log.config(m_file.getName());
bFile.setText(m_file.getName()); bFile.setText(m_file.getName());
cmd_reloadFile(); cmd_reloadFile();
} }
@ -361,7 +361,7 @@ public class VFileImport extends CPanel
info.setText(Msg.getMsg(Env.getCtx(), "Records") + "=" + m_data.size() info.setText(Msg.getMsg(Env.getCtx(), "Records") + "=" + m_data.size()
+ ", " + Msg.getMsg(Env.getCtx(), "Length") + "=" + length + " "); + ", " + Msg.getMsg(Env.getCtx(), "Length") + "=" + length + " ");
setCursor (Cursor.getDefaultCursor()); setCursor (Cursor.getDefaultCursor());
log.config("Records=" + m_data.size() if (log.isLoggable(Level.CONFIG)) log.config("Records=" + m_data.size()
+ ", Length=" + length); + ", Length=" + length);
} // cmd_loadFile } // cmd_loadFile
@ -451,7 +451,7 @@ public class VFileImport extends CPanel
ADialog.error(m_WindowNo, this, "FileImportNoFormat"); ADialog.error(m_WindowNo, this, "FileImportNoFormat");
return; return;
} }
log.config(m_format.getName()); if (log.isLoggable(Level.CONFIG)) log.config(m_format.getName());
// For all rows - update/insert DB table // For all rows - update/insert DB table
int row = 0; int row = 0;

View File

@ -281,7 +281,7 @@ public class VGenPanel extends CPanel implements ActionListener, ChangeListener,
int[] ids = pi.getIDs(); int[] ids = pi.getIDs();
if (ids == null || ids.length == 0) if (ids == null || ids.length == 0)
return; return;
log.config("PrintItems=" + ids.length); if (log.isLoggable(Level.CONFIG)) log.config("PrintItems=" + ids.length);
confirmPanelGen.getOKButton().setEnabled(false); confirmPanelGen.getOKButton().setEnabled(false);
// OK to print // OK to print

View File

@ -423,7 +423,7 @@ public class VMatch extends Match
private void cmd_searchTo() private void cmd_searchTo()
{ {
int row = xMatchedTable.getSelectedRow(); int row = xMatchedTable.getSelectedRow();
log.config("Row=" + row); if (log.isLoggable(Level.CONFIG)) log.config("Row=" + row);
double qty = 0.0; double qty = 0.0;
if (row < 0) if (row < 0)
@ -463,7 +463,7 @@ public class VMatch extends Match
{ {
if (e.getColumn() != 0) if (e.getColumn() != 0)
return; 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()); + ", Type=" + e.getType());
panel.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); panel.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));

View File

@ -475,7 +475,7 @@ public class VPayPrint extends PayPrint implements FormPanel, ActionListener, Ve
// get data // get data
int startDocumentNo = ((Number)fDocumentNo.getValue()).intValue(); 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)); panel.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
@ -504,7 +504,7 @@ public class VPayPrint extends PayPrint implements FormPanel, ActionListener, Ve
throws PropertyVetoException { throws PropertyVetoException {
String name = e.getPropertyName(); String name = e.getPropertyName();
Object value = e.getNewValue(); Object value = e.getNewValue();
log.config(name + "=" + value); if (log.isLoggable(Level.CONFIG)) log.config(name + "=" + value);
if (value == null) if (value == null)
return; return;

View File

@ -270,7 +270,7 @@ public class VPaySelect extends PaySelect implements FormPanel, ActionListener,
{ {
Timestamp payDate = (Timestamp)fieldPayDate.getValue(); Timestamp payDate = (Timestamp)fieldPayDate.getValue();
miniTable.setColorCompare(payDate); miniTable.setColorCompare(payDate);
log.config("PayDate=" + payDate); if (log.isLoggable(Level.CONFIG)) log.config("PayDate=" + payDate);
BankInfo bi = (BankInfo)fieldBankAccount.getSelectedItem(); BankInfo bi = (BankInfo)fieldBankAccount.getSelectedItem();

View File

@ -282,7 +282,7 @@ public class VStatementCreateFromBatch extends StatementCreateFromBatch implemen
*/ */
public void actionPerformed(ActionEvent e) public void actionPerformed(ActionEvent e)
{ {
log.config("Action=" + e.getActionCommand()); if (log.isLoggable(Level.CONFIG)) log.config("Action=" + e.getActionCommand());
// Object source = e.getSource(); // Object source = e.getSource();
if(e.getActionCommand().equals(ConfirmPanel.A_REFRESH)) if(e.getActionCommand().equals(ConfirmPanel.A_REFRESH))
{ {

View File

@ -210,7 +210,7 @@ public class VTreeMaintenance extends TreeMaintenance
model.addElement(item); model.addElement(item);
// List // List
log.config("#" + model.getSize()); if (log.isLoggable(Level.CONFIG)) log.config("#" + model.getSize());
centerList.setModel(model); centerList.setModel(model);
// Tree // Tree
centerTree.initTree(m_tree.getAD_Tree_ID()); centerTree.initTree(m_tree.getAD_Tree_ID());

View File

@ -570,7 +570,7 @@ public final class Find extends CDialog
*/ */
private void addSelectionColumn (GridField mField) private void addSelectionColumn (GridField mField)
{ {
log.config(mField.getHeader()); if (log.isLoggable(Level.CONFIG)) log.config(mField.getHeader());
int displayLength = mField.getDisplayLength(); int displayLength = mField.getDisplayLength();
if (displayLength > FIELDLENGTH) if (displayLength > FIELDLENGTH)
mField.setDisplayLength(FIELDLENGTH); mField.setDisplayLength(FIELDLENGTH);
@ -845,7 +845,7 @@ public final class Find extends CDialog
if (columnName != null) if (columnName != null)
{ {
log.config("Column: " + columnName); if (log.isLoggable(Level.CONFIG)) log.config("Column: " + columnName);
int referenceType = -1; int referenceType = -1;
MTable table = MTable.get(Env.getCtx(), m_tableName); MTable table = MTable.get(Env.getCtx(), m_tableName);
MColumn col = table.getColumn(columnName); MColumn col = table.getColumn(columnName);
@ -1606,7 +1606,7 @@ public final class Find extends CDialog
*/ */
private int getNoOfRecords (MQuery query, boolean alertZeroRecords) 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 "); StringBuilder sql = new StringBuilder("SELECT COUNT(*) FROM ");
sql.append(m_tableName); sql.append(m_tableName);
boolean hasWhere = false; 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 ] m_total = 0; // return 0 if more then allowed - teo_sarca [ 1708717 ]
} }
else else
log.config("#" + m_total); if (log.isLoggable(Level.CONFIG)) log.config("#" + m_total);
// //
if (query != null) if (query != null)
statusBar.setStatusToolTip (query.getWhereClause()); statusBar.setStatusToolTip (query.getWhereClause());
@ -1684,7 +1684,7 @@ public final class Find extends CDialog
*/ */
public void dataStatusChanged (DataStatusEvent e) public void dataStatusChanged (DataStatusEvent e)
{ {
log.config(e.getMessage()); if (log.isLoggable(Level.CONFIG)) log.config(e.getMessage());
// Action control // Action control
boolean changed = e.isChanged(); boolean changed = e.isChanged();
bIgnore.setEnabled(changed); bIgnore.setEnabled(changed);

View File

@ -18,6 +18,7 @@ package org.compiere.apps.search;
import java.awt.Component; import java.awt.Component;
import java.util.EventObject; import java.util.EventObject;
import java.util.logging.Level;
import javax.swing.AbstractCellEditor; import javax.swing.AbstractCellEditor;
import javax.swing.JTable; import javax.swing.JTable;
@ -81,7 +82,7 @@ public final class FindValueEditor extends AbstractCellEditor implements TableCe
if (m_editor == null) if (m_editor == null)
return null; return null;
Object obj = m_editor.getValue(); // returns Integer, BidDecimal, String Object obj = m_editor.getValue(); // returns Integer, BidDecimal, String
log.config("Obj=" + obj); if (log.isLoggable(Level.CONFIG)) log.config("Obj=" + obj);
return obj; return obj;
/** /**
if (obj == null) if (obj == null)
@ -114,7 +115,7 @@ public final class FindValueEditor extends AbstractCellEditor implements TableCe
m_between = true; m_between = true;
boolean enabled = !m_valueToColumn || (m_valueToColumn && m_between); 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 ) if ( enabled )
{ {

View File

@ -579,7 +579,7 @@ public abstract class Info extends CDialog
if (p_table == null) if (p_table == null)
return; return;
log.config( "OK=" + m_ok); if (log.isLoggable(Level.CONFIG)) log.config( "OK=" + m_ok);
if (!m_ok) // did not press OK if (!m_ok) // did not press OK
{ {
m_results.clear(); m_results.clear();
@ -599,7 +599,7 @@ public abstract class Info extends CDialog
if (data != null) if (data != null)
m_results.add(data); m_results.add(data);
} }
log.config(getSelectedSQL()); if (log.isLoggable(Level.CONFIG)) log.config(getSelectedSQL());
// Save Settings of detail info screens // Save Settings of detail info screens
saveSelectionDetail(); saveSelectionDetail();
@ -726,7 +726,7 @@ public abstract class Info extends CDialog
Object[] keys = getSelectedKeys(); Object[] keys = getSelectedKeys();
if (keys == null || keys.length == 0) 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); + m_ok + ", Cancel=" + m_cancel);
return ""; return "";
} }
@ -859,7 +859,7 @@ public abstract class Info extends CDialog
*/ */
public void dispose(boolean ok) public void dispose(boolean ok)
{ {
log.config("OK=" + ok); if (log.isLoggable(Level.CONFIG)) log.config("OK=" + ok);
m_ok = ok; m_ok = ok;
// End Worker // End Worker
@ -868,7 +868,7 @@ public abstract class Info extends CDialog
// worker continues, but it does not block UI // worker continues, but it does not block UI
if (m_worker.isAlive()) if (m_worker.isAlive())
m_worker.interrupt(); 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; m_worker = null;
// //

View File

@ -670,7 +670,7 @@ public class InfoProduct extends Info implements ActionListener, ChangeListener
*/ */
private void setPriceListVersion(int M_PriceList_Version_ID) 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++) for (int i = 0; i < pickPriceList.getItemCount(); i++)
{ {
KeyNamePair kn = (KeyNamePair)pickPriceList.getItemAt(i); KeyNamePair kn = (KeyNamePair)pickPriceList.getItemAt(i);
@ -706,7 +706,7 @@ public class InfoProduct extends Info implements ActionListener, ChangeListener
if (priceDate == null) if (priceDate == null)
priceDate = new Timestamp(System.currentTimeMillis()); 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; int retValue = 0;
String sql = "SELECT plv.M_PriceList_Version_ID, plv.ValidFrom " String sql = "SELECT plv.M_PriceList_Version_ID, plv.ValidFrom "
+ "FROM M_PriceList pl, M_PriceList_Version plv " + "FROM M_PriceList pl, M_PriceList_Version plv "

View File

@ -318,7 +318,7 @@ public class InfoSchedule extends CDialog
m_mAssignment.setS_Resource_ID(S_Resource_ID); m_mAssignment.setS_Resource_ID(S_Resource_ID);
Timestamp date = fieldDate.getTimestamp(); Timestamp date = fieldDate.getTimestamp();
int index = timePane.getSelectedIndex(); 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 // Set Info
m_loading = true; m_loading = true;

View File

@ -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) int C_BPartner_ID, int M_Product_ID, int M_Warehouse_ID, int M_AttributeSetInstance_ID)
{ {
super(frame, Msg.getMsg(Env.getCtx(), "PriceHistory"), true); 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_Product_ID=" + M_Product_ID
+ ", M_Warehouse_ID=" + M_Warehouse_ID + ", M_Warehouse_ID=" + M_Warehouse_ID
+ ", M_AttributeSetInstance_ID=" + M_AttributeSetInstance_ID); + ", M_AttributeSetInstance_ID=" + M_AttributeSetInstance_ID);

View File

@ -195,7 +195,7 @@ public class PAttributeInstance extends CDialog
*/ */
private void dynInit(int C_BPartner_ID) 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) if (C_BPartner_ID != 0)
{ {
int ShelfLifeMinPct = 0; int ShelfLifeMinPct = 0;
@ -233,12 +233,12 @@ public class PAttributeInstance extends CDialog
if (ShelfLifeMinPct > 0) if (ShelfLifeMinPct > 0)
{ {
m_sqlMinLife = " AND COALESCE(TRUNC(((daysbetween(asi.GuaranteeDate, SYSDATE))/p.GuaranteeDays)*100),0)>=" + ShelfLifeMinPct; 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) if (ShelfLifeMinDays > 0)
{ {
m_sqlMinLife += " AND COALESCE((daysbetween(asi.GuaranteeDate, SYSDATE)),0)>=" + ShelfLifeMinDays; 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 } // BPartner != 0

View File

@ -134,7 +134,7 @@ public class VSchedule extends CPanel
cal.add(m_type, 1); cal.add(m_type, 1);
m_endDate = new Timestamp (cal.getTimeInMillis()); 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 // Create Slots
MAssignmentSlot[] mas = m_model.getAssignmentSlots (S_Resource_ID, m_startDate, m_endDate, null, true, null); MAssignmentSlot[] mas = m_model.getAssignmentSlots (S_Resource_ID, m_startDate, m_endDate, null, true, null);
MAssignmentSlot[] mts = m_model.getDayTimeSlots (); MAssignmentSlot[] mts = m_model.getDayTimeSlots ();

View File

@ -648,7 +648,7 @@ public class WFActivity extends CPanel
*/ */
private void cmd_zoom() private void cmd_zoom()
{ {
log.config("Activity=" + m_activity); if (log.isLoggable(Level.CONFIG)) log.config("Activity=" + m_activity);
if (m_activity == null) if (m_activity == null)
return; return;
AEnv.zoom(m_activity.getAD_Table_ID(), m_activity.getRecord_ID()); AEnv.zoom(m_activity.getAD_Table_ID(), m_activity.getRecord_ID());
@ -659,7 +659,7 @@ public class WFActivity extends CPanel
*/ */
private void cmd_button() private void cmd_button()
{ {
log.config("Activity=" + m_activity); if (log.isLoggable(Level.CONFIG)) log.config("Activity=" + m_activity);
if (m_activity == null) if (m_activity == null)
return; return;
// //
@ -705,7 +705,7 @@ public class WFActivity extends CPanel
*/ */
private void cmd_OK() private void cmd_OK()
{ {
log.config("Activity=" + m_activity); if (log.isLoggable(Level.CONFIG)) log.config("Activity=" + m_activity);
if (m_activity == null) if (m_activity == null)
return; return;
int AD_User_ID = Env.getAD_User_ID(Env.getCtx()); int AD_User_ID = Env.getAD_User_ID(Env.getCtx());
@ -721,7 +721,7 @@ public class WFActivity extends CPanel
if (forward != null) if (forward != null)
{ {
log.config("Forward to " + forward); if (log.isLoggable(Level.CONFIG)) log.config("Forward to " + forward);
int fw = ((Integer)forward).intValue(); int fw = ((Integer)forward).intValue();
if (fw == AD_User_ID || fw == 0) if (fw == AD_User_ID || fw == 0)
{ {
@ -759,7 +759,7 @@ public class WFActivity extends CPanel
return; return;
} }
// //
log.config("Answer=" + value + " - " + textMsg); if (log.isLoggable(Level.CONFIG)) log.config("Answer=" + value + " - " + textMsg);
try try
{ {
m_activity.setUserChoice(AD_User_ID, value, dt, textMsg); m_activity.setUserChoice(AD_User_ID, value, dt, textMsg);
@ -776,7 +776,7 @@ public class WFActivity extends CPanel
// User Action // User Action
else else
{ {
log.config("Action=" + node.getAction() + " - " + textMsg); if (log.isLoggable(Level.CONFIG)) log.config("Action=" + node.getAction() + " - " + textMsg);
try try
{ {
// ensure activity is ran within a transaction // ensure activity is ran within a transaction

View File

@ -264,7 +264,7 @@ public class GridController extends CPanel
*/ */
public void dispose() public void dispose()
{ {
log.config( "(" + m_mTab.toString() + ")"); if (log.isLoggable(Level.CONFIG)) log.config( "(" + m_mTab.toString() + ")");
// clear info // clear info
stopEditor(false); stopEditor(false);
if (m_mTab.isLoadComplete()) if (m_mTab.isLoadComplete())
@ -357,7 +357,7 @@ public class GridController extends CPanel
public boolean initGrid (GridTab mTab, boolean onlyMultiRow, public boolean initGrid (GridTab mTab, boolean onlyMultiRow,
int WindowNo, APanel aPanel, GridWindow mWindow, boolean lazy) 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_mTab = mTab;
m_WindowNo = WindowNo; m_WindowNo = WindowNo;
m_onlyMultiRow = onlyMultiRow; m_onlyMultiRow = onlyMultiRow;
@ -654,7 +654,7 @@ public class GridController extends CPanel
treeName = "AD_TreeCMM_ID"; treeName = "AD_TreeCMM_ID";
} }
int AD_Tree_ID = Env.getContextAsInt (Env.getCtx(), m_WindowNo, treeName, true); 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) if (AD_Tree_ID == 0)
AD_Tree_ID = MTree.getDefaultAD_Tree_ID ( AD_Tree_ID = MTree.getDefaultAD_Tree_ID (
Env.getAD_Client_ID(Env.getCtx()), m_mTab.getKeyColumnName()); Env.getAD_Client_ID(Env.getCtx()), m_mTab.getKeyColumnName());
@ -824,7 +824,7 @@ public class GridController extends CPanel
// if (e.getChangedColumn() == 0) // if (e.getChangedColumn() == 0)
// return; // return;
int col = e.getChangedColumn(); 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 // Process Callout
GridField mField = m_mTab.getField(col); GridField mField = m_mTab.getField(col);
@ -855,7 +855,7 @@ public class GridController extends CPanel
// vTable.stopEditor(graphPanel); // vTable.stopEditor(graphPanel);
int rowTable = vTable.getSelectedRow(); int rowTable = vTable.getSelectedRow();
int rowCurrent = m_mTab.getCurrentRow(); 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 /* BT [ 1972495 ] Multirow Automatic New Record loses context
// FR [ 1757088 ] // FR [ 1757088 ]
if(rowCurrent + 1 == vTable.getRowCount() && !isSingleRow() && Env.isAutoNew(Env.getCtx()) && m_mTab.getRecord_ID() != -1) 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(); Object value = e.getNewValue();
if (value == null) if (value == null)
return; return;
log.config(e.getPropertyName() + "=" + value if (log.isLoggable(Level.CONFIG)) log.config(e.getPropertyName() + "=" + value
+ " - " + value.getClass().toString()); + " - " + value.getClass().toString());
if (!(value instanceof MTreeNode)) if (!(value instanceof MTreeNode))
return; return;
@ -985,7 +985,7 @@ public class GridController extends CPanel
GridField changedField = m_mTab.getField(col); GridField changedField = m_mTab.getField(col);
String columnName = changedField.getColumnName(); String columnName = changedField.getColumnName();
ArrayList<GridField> dependants = m_mTab.getDependantFields(columnName); ArrayList<GridField> dependants = m_mTab.getDependantFields(columnName);
log.config("(" + m_mTab.toString() + ") " if (log.isLoggable(Level.CONFIG)) log.config("(" + m_mTab.toString() + ") "
+ columnName + " - Dependents=" + dependants.size()); + columnName + " - Dependents=" + dependants.size());
// No Dependents and no Callout - Set just Background // No Dependents and no Callout - Set just Background
if (dependants.size() == 0 && changedField.getCallout().length() > 0) if (dependants.size() == 0 && changedField.getCallout().length() > 0)
@ -1011,7 +1011,7 @@ public class GridController extends CPanel
// complete single row re-display // complete single row re-display
boolean noData = m_mTab.getRowCount() == 0; 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) // All Components in vPanel (Single Row)
Set<String> hiddens = new HashSet<String>(); Set<String> hiddens = new HashSet<String>();
@ -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")); + (col <= 0 ? "complete" : "seletive"));
} // dynamicDisplay } // dynamicDisplay
@ -1199,17 +1199,17 @@ public class GridController extends CPanel
{ {
if (!((VEditor)source).isReadWrite()) if (!((VEditor)source).isReadWrite())
{ {
log.config("(" + m_mTab.toString() + ") " + e.getPropertyName()); if (log.isLoggable(Level.CONFIG)) log.config("(" + m_mTab.toString() + ") " + e.getPropertyName());
return; return;
} }
} }
else else
{ {
log.config("(" + m_mTab.toString() + ") " + e.getPropertyName()); if (log.isLoggable(Level.CONFIG)) log.config("(" + m_mTab.toString() + ") " + e.getPropertyName());
return; return;
} }
} // processed } // processed
log.config("(" + m_mTab.toString() + ") " if (log.isLoggable(Level.CONFIG)) log.config("(" + m_mTab.toString() + ") "
+ e.getPropertyName() + "=" + e.getNewValue() + " (" + e.getOldValue() + ") " + e.getPropertyName() + "=" + e.getNewValue() + " (" + e.getOldValue() + ") "
+ (e.getOldValue() == null ? "" : e.getOldValue().getClass().getName())); + (e.getOldValue() == null ? "" : e.getOldValue().getClass().getName()));
@ -1369,7 +1369,7 @@ public class GridController extends CPanel
*/ */
public void stopEditor (boolean saveValue) 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 // MultiRow - remove editors
vTable.stopEditor(saveValue); vTable.stopEditor(saveValue);

View File

@ -287,7 +287,7 @@ public class VCreateFromDepositBatchUI extends CreateFromDepositBatch implements
*/ */
public void actionPerformed(ActionEvent e) public void actionPerformed(ActionEvent e)
{ {
log.config("Action=" + e.getActionCommand()); if (log.isLoggable(Level.CONFIG)) log.config("Action=" + e.getActionCommand());
// Object source = e.getSource(); // Object source = e.getSource();
if(e.getActionCommand().equals(ConfirmPanel.A_REFRESH)) if(e.getActionCommand().equals(ConfirmPanel.A_REFRESH))
{ {

View File

@ -181,12 +181,12 @@ public class VCreateFromInvoiceUI extends CreateFromInvoice implements ActionLis
*/ */
public void actionPerformed(ActionEvent e) public void actionPerformed(ActionEvent e)
{ {
log.config("Action=" + e.getActionCommand()); if (log.isLoggable(Level.CONFIG)) log.config("Action=" + e.getActionCommand());
if (m_actionActive) if (m_actionActive)
return; return;
m_actionActive = true; m_actionActive = true;
log.config("Action=" + e.getActionCommand()); if (log.isLoggable(Level.CONFIG)) log.config("Action=" + e.getActionCommand());
// Order // Order
if (e.getSource().equals(orderField)) if (e.getSource().equals(orderField))
{ {
@ -232,7 +232,7 @@ public class VCreateFromInvoiceUI extends CreateFromInvoice implements ActionLis
*/ */
public void vetoableChange (PropertyChangeEvent e) 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 // BPartner - load Order/Invoice/Shipment
if (e.getPropertyName().equals("C_BPartner_ID")) 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) 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,""); KeyNamePair pp = new KeyNamePair(0,"");
// load PO Orders - Closed, Completed // load PO Orders - Closed, Completed
orderField.removeActionListener(this); orderField.removeActionListener(this);
@ -299,7 +299,7 @@ public class VCreateFromInvoiceUI extends CreateFromInvoice implements ActionLis
*/ */
private void initBPShipmentDetails(int C_BPartner_ID) 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 // load Shipments (Receipts) - Completed, Closed
shipmentField.removeActionListener(this); shipmentField.removeActionListener(this);

View File

@ -137,7 +137,7 @@ public class VCreateFromRMAUI extends CreateFromRMA implements VetoableChangeLis
*/ */
public void vetoableChange (PropertyChangeEvent e) 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 // BPartner - load Order/Invoice/Shipment
if (e.getPropertyName().equals("C_BPartner_ID")) if (e.getPropertyName().equals("C_BPartner_ID"))

View File

@ -223,12 +223,12 @@ public class VCreateFromShipmentUI extends CreateFromShipment implements ActionL
*/ */
public void actionPerformed(ActionEvent e) public void actionPerformed(ActionEvent e)
{ {
log.config("Action=" + e.getActionCommand()); if (log.isLoggable(Level.CONFIG)) log.config("Action=" + e.getActionCommand());
if (m_actionActive) if (m_actionActive)
return; return;
m_actionActive = true; m_actionActive = true;
log.config("Action=" + e.getActionCommand()); if (log.isLoggable(Level.CONFIG)) log.config("Action=" + e.getActionCommand());
// Order // Order
if (e.getSource().equals(orderField)) if (e.getSource().equals(orderField))
{ {
@ -283,7 +283,7 @@ public class VCreateFromShipmentUI extends CreateFromShipment implements ActionL
*/ */
public void vetoableChange (PropertyChangeEvent e) 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 // BPartner - load Order/Invoice/Shipment
if (e.getPropertyName().equals("C_BPartner_ID")) 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) 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,""); KeyNamePair pp = new KeyNamePair(0,"");
// load PO Orders - Closed, Completed // load PO Orders - Closed, Completed
orderField.removeActionListener(this); orderField.removeActionListener(this);
@ -350,7 +350,7 @@ public class VCreateFromShipmentUI extends CreateFromShipment implements ActionL
*/ */
private void initBPInvoiceDetails(int C_BPartner_ID) 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 // load Shipments (Receipts) - Completed, Closed
invoiceField.removeActionListener(this); invoiceField.removeActionListener(this);

View File

@ -285,7 +285,7 @@ public class VCreateFromStatementUI extends CreateFromStatement implements Actio
*/ */
public void actionPerformed(ActionEvent e) public void actionPerformed(ActionEvent e)
{ {
log.config("Action=" + e.getActionCommand()); if (log.isLoggable(Level.CONFIG)) log.config("Action=" + e.getActionCommand());
// Object source = e.getSource(); // Object source = e.getSource();
if(e.getActionCommand().equals(ConfirmPanel.A_REFRESH)) if(e.getActionCommand().equals(ConfirmPanel.A_REFRESH))
{ {

View File

@ -19,6 +19,7 @@ import java.awt.Insets;
import java.awt.event.ActionEvent; import java.awt.event.ActionEvent;
import java.awt.event.ActionListener; import java.awt.event.ActionListener;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.logging.Level;
import org.adempiere.plaf.AdempierePLAF; import org.adempiere.plaf.AdempierePLAF;
import org.compiere.apps.ADialog; import org.compiere.apps.ADialog;
@ -124,7 +125,7 @@ public abstract class VPaymentFormDirect extends PaymentFormDirect implements Ac
dataOK = false; dataOK = false;
} }
// //
log.config("OK=" + dataOK); if (log.isLoggable(Level.CONFIG)) log.config("OK=" + dataOK);
return dataOK; return dataOK;
} }

Some files were not shown because too many files have changed in this diff Show More