IDEMPIERE-638 Check log level before calling logging method / s_log.info logger.config+info

This commit is contained in:
Richard Morales 2013-02-22 15:59:05 -05:00
parent 7c53aa5f4d
commit 427e8e08f2
31 changed files with 64 additions and 68 deletions

View File

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

View File

@ -194,7 +194,7 @@ public class SequenceCheck extends SvrProcess
if (IDRangeEnd <= 0) if (IDRangeEnd <= 0)
IDRangeEnd = DB.getSQLValue(null, IDRangeEnd = DB.getSQLValue(null,
"SELECT MIN(IDRangeStart)-1 FROM AD_Replication"); "SELECT MIN(IDRangeStart)-1 FROM AD_Replication");
s_log.info("IDRangeEnd = " + IDRangeEnd); if (s_log.isLoggable(Level.INFO)) s_log.info("IDRangeEnd = " + IDRangeEnd);
// //
String sql = "SELECT * FROM AD_Sequence " String sql = "SELECT * FROM AD_Sequence "
+ "WHERE IsTableID='Y' " + "WHERE IsTableID='Y' "

View File

@ -17,6 +17,7 @@ import java.util.ArrayList;
import java.util.HashSet; import java.util.HashSet;
import java.util.List; import java.util.List;
import java.util.Set; import java.util.Set;
import java.util.logging.Level;
import org.compiere.model.MQuery; import org.compiere.model.MQuery;
import org.compiere.model.PO; import org.compiere.model.PO;
@ -83,7 +84,7 @@ public class ZoomInfoFactory {
public static List<ZoomInfoFactory.ZoomInfo> retrieveZoomInfos(final PO po, public static List<ZoomInfoFactory.ZoomInfo> retrieveZoomInfos(final PO po,
final int windowID) { final int windowID) {
logger.config("PO=" + po + " - AD_Window_ID=" + windowID); if (logger.isLoggable(Level.CONFIG)) logger.config("PO=" + po + " - AD_Window_ID=" + windowID);
final List<ZoomInfoFactory.ZoomInfo> result = new ArrayList<ZoomInfoFactory.ZoomInfo>(); final List<ZoomInfoFactory.ZoomInfo> result = new ArrayList<ZoomInfoFactory.ZoomInfo>();

View File

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

View File

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

View File

@ -659,7 +659,7 @@ public class MCost extends X_M_Cost
{ {
BigDecimal cost = getCurrentCost(product, 0, ass[i], 0, BigDecimal cost = getCurrentCost(product, 0, ass[i], 0,
null, Env.ONE, 0, false, trxNameUsed); // create non-zero costs null, Env.ONE, 0, false, trxNameUsed); // create non-zero costs
s_log.info(product.getName() + " = " + cost); if (s_log.isLoggable(Level.INFO)) s_log.info(product.getName() + " = " + cost);
} }
} }
} }

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -678,7 +678,7 @@ public class MSequence extends X_AD_Sequence
rs = null; rs = null;
pstmt = null; pstmt = null;
} }
s_log.info ("AD_Client_ID=" + AD_Client_ID if (s_log.isLoggable(Level.INFO)) s_log.info ("AD_Client_ID=" + AD_Client_ID
+ " - created #" + counter + " - created #" + counter
+ " - success=" + success); + " - success=" + success);
return success; return success;

View File

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

View File

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

View File

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

View File

@ -434,7 +434,7 @@ public class MUOMConversion extends X_C_UOM_Conversion
} }
if (retValue == null) if (retValue == null)
{ {
s_log.info ("NOT found - FromUOM=" + C_UOM_From_ID + ", ToUOM=" + C_UOM_To_ID); if (s_log.isLoggable(Level.INFO)) s_log.info ("NOT found - FromUOM=" + C_UOM_From_ID + ", ToUOM=" + C_UOM_To_ID);
return null; return null;
} }

View File

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

View File

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

View File

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

View File

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

View File

@ -20,6 +20,7 @@ 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.List; import java.util.List;
import java.util.logging.Level;
import javax.swing.JComponent; import javax.swing.JComponent;
import javax.swing.JPopupMenu; import javax.swing.JPopupMenu;
@ -60,7 +61,7 @@ public class AZoomAcross
public AZoomAcross(JComponent invoker, PO po, final int windowID) { public AZoomAcross(JComponent invoker, PO po, final int windowID) {
logger.config("PO=" + po+", WindowID="+windowID); if (logger.isLoggable(Level.CONFIG)) logger.config("PO=" + po+", WindowID="+windowID);
mkZoomTargets(po, windowID); mkZoomTargets(po, windowID);

View File

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

View File

@ -2559,7 +2559,7 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
* Start Process ---- * Start Process ----
*/ */
logger.config("Process_ID=" + wButton.getProcess_ID() + ", Record_ID=" + record_ID); if (logger.isLoggable(Level.CONFIG)) logger.config("Process_ID=" + wButton.getProcess_ID() + ", Record_ID=" + record_ID);
if (wButton.getProcess_ID() == 0) if (wButton.getProcess_ID() == 0)
{ {

View File

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

View File

@ -19,6 +19,7 @@ package org.adempiere.webui.panel;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.logging.Level;
import org.adempiere.webui.AdempiereWebUI; import org.adempiere.webui.AdempiereWebUI;
import org.adempiere.webui.component.ConfirmPanel; import org.adempiere.webui.component.ConfirmPanel;
@ -319,7 +320,7 @@ public class WDocActionPanel extends Window implements EventListener<Event>, Dia
{ {
int index = getSelectedIndex(); int index = getSelectedIndex();
// Save Selection // Save Selection
logger.config("DocAction=" + s_value[index]); if (logger.isLoggable(Level.CONFIG)) logger.config("DocAction=" + s_value[index]);
gridTab.setValue("DocAction", s_value[index]); gridTab.setValue("DocAction", s_value[index]);
} // save } // save

View File

@ -13,6 +13,7 @@
package org.adempiere.webui.util; package org.adempiere.webui.util;
import java.util.Properties; import java.util.Properties;
import java.util.logging.Level;
import org.adempiere.exceptions.AdempiereException; import org.adempiere.exceptions.AdempiereException;
import org.adempiere.webui.editor.WEditor; import org.adempiere.webui.editor.WEditor;
@ -62,23 +63,23 @@ public class GridTabDataBinder implements ValueChangeListener {
{ {
if(!gridField.isEditable(true)) if(!gridField.isEditable(true))
{ {
logger.config("(" + gridTab.toString() + ") " + e.getPropertyName()); if (logger.isLoggable(Level.CONFIG)) logger.config("(" + gridTab.toString() + ") " + e.getPropertyName());
return; return;
} }
} }
else if(!editor.isReadWrite()) else if(!editor.isReadWrite())
{ {
logger.config("(" + gridTab.toString() + ") " + e.getPropertyName()); if (logger.isLoggable(Level.CONFIG)) logger.config("(" + gridTab.toString() + ") " + e.getPropertyName());
return; return;
} }
} }
else else
{ {
logger.config("(" + gridTab.toString() + ") " + e.getPropertyName()); if (logger.isLoggable(Level.CONFIG)) logger.config("(" + gridTab.toString() + ") " + e.getPropertyName());
return; return;
} }
} // processed } // processed
logger.config("(" + gridTab.toString() + ") " if (logger.isLoggable(Level.CONFIG)) logger.config("(" + gridTab.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()));

View File

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