IDEMPIERE-638 Check log level before calling logging method / .log(Level
This commit is contained in:
parent
e7f817ec2b
commit
c45dfd9557
|
@ -269,7 +269,7 @@ public class FactAcctReset extends SvrProcess
|
||||||
sql1 += " AND TRUNC(fact.DateAcct) <= " + DB.TO_DATE(p_DateAcct_To);
|
sql1 += " AND TRUNC(fact.DateAcct) <= " + DB.TO_DATE(p_DateAcct_To);
|
||||||
sql1 += ")";
|
sql1 += ")";
|
||||||
|
|
||||||
log.log(Level.FINE, sql1);
|
if (log.isLoggable(Level.FINE))log.log(Level.FINE, sql1);
|
||||||
|
|
||||||
int reset = DB.executeUpdate(sql1, get_TrxName());
|
int reset = DB.executeUpdate(sql1, get_TrxName());
|
||||||
// Fact
|
// Fact
|
||||||
|
@ -288,7 +288,7 @@ public class FactAcctReset extends SvrProcess
|
||||||
if (p_DateAcct_To != null)
|
if (p_DateAcct_To != null)
|
||||||
sql2 += " AND TRUNC(Fact_Acct.DateAcct) <= " + DB.TO_DATE(p_DateAcct_To);
|
sql2 += " AND TRUNC(Fact_Acct.DateAcct) <= " + DB.TO_DATE(p_DateAcct_To);
|
||||||
|
|
||||||
log.log(Level.FINE, sql2);
|
if (log.isLoggable(Level.FINE))log.log(Level.FINE, sql2);
|
||||||
|
|
||||||
int deleted = DB.executeUpdate(sql2, get_TrxName());
|
int deleted = DB.executeUpdate(sql2, get_TrxName());
|
||||||
//
|
//
|
||||||
|
|
|
@ -553,7 +553,7 @@ public class RequestEMailProcessor extends SvrProcess
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (IOException e) {
|
catch (IOException e) {
|
||||||
log.log(Level.FINE, "Error extracting attachments", e);
|
if (log.isLoggable(Level.FINE))log.log(Level.FINE, "Error extracting attachments", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -167,34 +167,34 @@ public class AddressLookup implements AddressLookupInterface {
|
||||||
Element firstElement = (Element) firstDataNode;
|
Element firstElement = (Element) firstDataNode;
|
||||||
NodeList firstNameList = firstElement.getElementsByTagName("Name");
|
NodeList firstNameList = firstElement.getElementsByTagName("Name");
|
||||||
Element NameElement = (Element) firstNameList.item(0);
|
Element NameElement = (Element) firstNameList.item(0);
|
||||||
log.log(Level.FINE, "Name: " + NameElement.getChildNodes().item(0).getNodeValue().trim() + " Node: " + i);
|
if (log.isLoggable(Level.FINE)){log.log(Level.FINE, "Name: " + NameElement.getChildNodes().item(0).getNodeValue().trim() + " Node: " + i);}
|
||||||
|
|
||||||
// Found and ADDR Node
|
// Found and ADDR Node
|
||||||
if (NameElement.getChildNodes().item(0).getNodeValue().trim().equals("ADDR")) {
|
if (NameElement.getChildNodes().item(0).getNodeValue().trim().equals("ADDR")) {
|
||||||
NodeList firstValueList = firstElement.getElementsByTagName("Value");
|
NodeList firstValueList = firstElement.getElementsByTagName("Value");
|
||||||
Element ValueElement = (Element) firstValueList.item(0);
|
Element ValueElement = (Element) firstValueList.item(0);
|
||||||
log.log(Level.FINE, "Value: " + ValueElement.getChildNodes().item(0).getNodeValue().replaceAll("\n","").trim() + " Node: " + i);
|
if (log.isLoggable(Level.FINE)){log.log(Level.FINE, "Value: " + ValueElement.getChildNodes().item(0).getNodeValue().replaceAll("\n","").trim() + " Node: " + i);}
|
||||||
postcode.setAddr(ValueElement.getChildNodes().item(0).getNodeValue().replaceAll("\n","").trim());
|
postcode.setAddr(ValueElement.getChildNodes().item(0).getNodeValue().replaceAll("\n","").trim());
|
||||||
}
|
}
|
||||||
// Found and STREET Node
|
// Found and STREET Node
|
||||||
if (NameElement.getChildNodes().item(0).getNodeValue().trim().equals("STREET")) {
|
if (NameElement.getChildNodes().item(0).getNodeValue().trim().equals("STREET")) {
|
||||||
NodeList firstValueList = firstElement.getElementsByTagName("Value");
|
NodeList firstValueList = firstElement.getElementsByTagName("Value");
|
||||||
Element ValueElement = (Element) firstValueList.item(0);
|
Element ValueElement = (Element) firstValueList.item(0);
|
||||||
log.log(Level.FINE, "Value: " + ValueElement.getChildNodes().item(0).getNodeValue().replaceAll("\n","").trim() + " Node: " + i);
|
if (log.isLoggable(Level.FINE)){log.log(Level.FINE, "Value: " + ValueElement.getChildNodes().item(0).getNodeValue().replaceAll("\n","").trim() + " Node: " + i);}
|
||||||
postcode.setStreet1(ValueElement.getChildNodes().item(0).getNodeValue().replaceAll("\n","").trim());
|
postcode.setStreet1(ValueElement.getChildNodes().item(0).getNodeValue().replaceAll("\n","").trim());
|
||||||
}
|
}
|
||||||
// Found and LOCALITY Node
|
// Found and LOCALITY Node
|
||||||
if (NameElement.getChildNodes().item(0).getNodeValue().trim().equals("LOCALITY")) {
|
if (NameElement.getChildNodes().item(0).getNodeValue().trim().equals("LOCALITY")) {
|
||||||
NodeList firstValueList = firstElement.getElementsByTagName("Value");
|
NodeList firstValueList = firstElement.getElementsByTagName("Value");
|
||||||
Element ValueElement = (Element) firstValueList.item(0);
|
Element ValueElement = (Element) firstValueList.item(0);
|
||||||
log.log(Level.FINE, "Value: " + ValueElement.getChildNodes().item(0).getNodeValue().replaceAll("\n","").trim() + " Node: " + i);
|
if (log.isLoggable(Level.FINE)){log.log(Level.FINE, "Value: " + ValueElement.getChildNodes().item(0).getNodeValue().replaceAll("\n","").trim() + " Node: " + i);}
|
||||||
postcode.setStreet2(ValueElement.getChildNodes().item(0).getNodeValue().replaceAll("\n","").trim());
|
postcode.setStreet2(ValueElement.getChildNodes().item(0).getNodeValue().replaceAll("\n","").trim());
|
||||||
}
|
}
|
||||||
// Found and POSTTOWN Node
|
// Found and POSTTOWN Node
|
||||||
if (NameElement.getChildNodes().item(0).getNodeValue().trim().equals("POSTTOWN")) {
|
if (NameElement.getChildNodes().item(0).getNodeValue().trim().equals("POSTTOWN")) {
|
||||||
NodeList firstValueList = firstElement.getElementsByTagName("Value");
|
NodeList firstValueList = firstElement.getElementsByTagName("Value");
|
||||||
Element ValueElement = (Element) firstValueList.item(0);
|
Element ValueElement = (Element) firstValueList.item(0);
|
||||||
log.log(Level.FINE, "Value: " + ValueElement.getChildNodes().item(0).getNodeValue().replaceAll("\n","").trim() + " Node: " + i);
|
if (log.isLoggable(Level.FINE)){log.log(Level.FINE, "Value: " + ValueElement.getChildNodes().item(0).getNodeValue().replaceAll("\n","").trim() + " Node: " + i);}
|
||||||
postcode.setCity(ValueElement.getChildNodes().item(0).getNodeValue().replaceAll("\n","").trim());
|
postcode.setCity(ValueElement.getChildNodes().item(0).getNodeValue().replaceAll("\n","").trim());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -202,56 +202,56 @@ public class AddressLookup implements AddressLookupInterface {
|
||||||
if (NameElement.getChildNodes().item(0).getNodeValue().trim().equals("COUNTY")) {
|
if (NameElement.getChildNodes().item(0).getNodeValue().trim().equals("COUNTY")) {
|
||||||
NodeList firstValueList = firstElement.getElementsByTagName("Value");
|
NodeList firstValueList = firstElement.getElementsByTagName("Value");
|
||||||
Element ValueElement = (Element) firstValueList.item(0);
|
Element ValueElement = (Element) firstValueList.item(0);
|
||||||
log.log(Level.FINE, "Value: " + ValueElement.getChildNodes().item(0).getNodeValue().replaceAll("\n","").trim() + " Node: " + i);
|
if (log.isLoggable(Level.FINE)){log.log(Level.FINE, "Value: " + ValueElement.getChildNodes().item(0).getNodeValue().replaceAll("\n","").trim() + " Node: " + i);}
|
||||||
postcode.setRegion(ValueElement.getChildNodes().item(0).getNodeValue().replaceAll("\n","").trim());
|
postcode.setRegion(ValueElement.getChildNodes().item(0).getNodeValue().replaceAll("\n","").trim());
|
||||||
}
|
}
|
||||||
// Found and POSTCODE Node
|
// Found and POSTCODE Node
|
||||||
if (NameElement.getChildNodes().item(0).getNodeValue().trim().equals("POSTCODE")) {
|
if (NameElement.getChildNodes().item(0).getNodeValue().trim().equals("POSTCODE")) {
|
||||||
NodeList firstValueList = firstElement.getElementsByTagName("Value");
|
NodeList firstValueList = firstElement.getElementsByTagName("Value");
|
||||||
Element ValueElement = (Element) firstValueList.item(0);
|
Element ValueElement = (Element) firstValueList.item(0);
|
||||||
log.log(Level.FINE, "Value: " + ValueElement.getChildNodes().item(0).getNodeValue().replaceAll("\n","").trim() + " Node: " + i);
|
if (log.isLoggable(Level.FINE)){log.log(Level.FINE, "Value: " + ValueElement.getChildNodes().item(0).getNodeValue().replaceAll("\n","").trim() + " Node: " + i);}
|
||||||
postcode.setPostcode(ValueElement.getChildNodes().item(0).getNodeValue().replaceAll("\n","").trim());
|
postcode.setPostcode(ValueElement.getChildNodes().item(0).getNodeValue().replaceAll("\n","").trim());
|
||||||
}
|
}
|
||||||
// Found and COUNTRY Node
|
// Found and COUNTRY Node
|
||||||
if (NameElement.getChildNodes().item(0).getNodeValue().trim().equals("COUNTRY")) {
|
if (NameElement.getChildNodes().item(0).getNodeValue().trim().equals("COUNTRY")) {
|
||||||
NodeList firstValueList = firstElement.getElementsByTagName("Value");
|
NodeList firstValueList = firstElement.getElementsByTagName("Value");
|
||||||
Element ValueElement = (Element) firstValueList.item(0);
|
Element ValueElement = (Element) firstValueList.item(0);
|
||||||
log.log(Level.FINE, "Value: " + ValueElement.getChildNodes().item(0).getNodeValue().replaceAll("\n","").trim() + " Node: " + i);
|
if (log.isLoggable(Level.FINE)){log.log(Level.FINE, "Value: " + ValueElement.getChildNodes().item(0).getNodeValue().replaceAll("\n","").trim() + " Node: " + i);}
|
||||||
postcode.setCountry(ValueElement.getChildNodes().item(0).getNodeValue().replaceAll("\n","").trim());
|
postcode.setCountry(ValueElement.getChildNodes().item(0).getNodeValue().replaceAll("\n","").trim());
|
||||||
}
|
}
|
||||||
// Found and COUNTRYCODE Node
|
// Found and COUNTRYCODE Node
|
||||||
if (NameElement.getChildNodes().item(0).getNodeValue().trim().equals("COUNTRYCODE")) {
|
if (NameElement.getChildNodes().item(0).getNodeValue().trim().equals("COUNTRYCODE")) {
|
||||||
NodeList firstValueList = firstElement.getElementsByTagName("Value");
|
NodeList firstValueList = firstElement.getElementsByTagName("Value");
|
||||||
Element ValueElement = (Element) firstValueList.item(0);
|
Element ValueElement = (Element) firstValueList.item(0);
|
||||||
log.log(Level.FINE, "Value: " + ValueElement.getChildNodes().item(0).getNodeValue().replaceAll("\n","").trim() + " Node: " + i);
|
if (log.isLoggable(Level.FINE)){log.log(Level.FINE, "Value: " + ValueElement.getChildNodes().item(0).getNodeValue().replaceAll("\n","").trim() + " Node: " + i);}
|
||||||
postcode.setCountryCode(ValueElement.getChildNodes().item(0).getNodeValue().replaceAll("\n","").trim());
|
postcode.setCountryCode(ValueElement.getChildNodes().item(0).getNodeValue().replaceAll("\n","").trim());
|
||||||
}
|
}
|
||||||
// Found and TRADCOUNTY Node
|
// Found and TRADCOUNTY Node
|
||||||
if (NameElement.getChildNodes().item(0).getNodeValue().trim().equals("TRADCOUNTY")) {
|
if (NameElement.getChildNodes().item(0).getNodeValue().trim().equals("TRADCOUNTY")) {
|
||||||
NodeList firstValueList = firstElement.getElementsByTagName("Value");
|
NodeList firstValueList = firstElement.getElementsByTagName("Value");
|
||||||
Element ValueElement = (Element) firstValueList.item(0);
|
Element ValueElement = (Element) firstValueList.item(0);
|
||||||
log.log(Level.FINE, "Value: " + ValueElement.getChildNodes().item(0).getNodeValue().replaceAll("\n","").trim() + " Node: " + i);
|
if (log.isLoggable(Level.FINE)){log.log(Level.FINE, "Value: " + ValueElement.getChildNodes().item(0).getNodeValue().replaceAll("\n","").trim() + " Node: " + i);}
|
||||||
postcode.setTradCounty(ValueElement.getChildNodes().item(0).getNodeValue().replaceAll("\n","").trim());
|
postcode.setTradCounty(ValueElement.getChildNodes().item(0).getNodeValue().replaceAll("\n","").trim());
|
||||||
}
|
}
|
||||||
// Found and LONLOCOUT Node
|
// Found and LONLOCOUT Node
|
||||||
if (NameElement.getChildNodes().item(0).getNodeValue().trim().equals("LONLOCOUT")) {
|
if (NameElement.getChildNodes().item(0).getNodeValue().trim().equals("LONLOCOUT")) {
|
||||||
NodeList firstValueList = firstElement.getElementsByTagName("Value");
|
NodeList firstValueList = firstElement.getElementsByTagName("Value");
|
||||||
Element ValueElement = (Element) firstValueList.item(0);
|
Element ValueElement = (Element) firstValueList.item(0);
|
||||||
log.log(Level.FINE, "Value: " + ValueElement.getChildNodes().item(0).getNodeValue().replaceAll("\n","").trim() + " Node: " + i);
|
if (log.isLoggable(Level.FINE)){log.log(Level.FINE, "Value: " + ValueElement.getChildNodes().item(0).getNodeValue().replaceAll("\n","").trim() + " Node: " + i);}
|
||||||
postcode.setLonLocation(ValueElement.getChildNodes().item(0).getNodeValue().replaceAll("\n","").trim());
|
postcode.setLonLocation(ValueElement.getChildNodes().item(0).getNodeValue().replaceAll("\n","").trim());
|
||||||
}
|
}
|
||||||
// Found and ADMINCOUNTY Node
|
// Found and ADMINCOUNTY Node
|
||||||
if (NameElement.getChildNodes().item(0).getNodeValue().trim().equals("ADMINCOUNTY")) {
|
if (NameElement.getChildNodes().item(0).getNodeValue().trim().equals("ADMINCOUNTY")) {
|
||||||
NodeList firstValueList = firstElement.getElementsByTagName("Value");
|
NodeList firstValueList = firstElement.getElementsByTagName("Value");
|
||||||
Element ValueElement = (Element) firstValueList.item(0);
|
Element ValueElement = (Element) firstValueList.item(0);
|
||||||
log.log(Level.FINE, "Value: " + ValueElement.getChildNodes().item(0).getNodeValue().replaceAll("\n","").trim() + " Node: " + i);
|
if (log.isLoggable(Level.FINE)){log.log(Level.FINE, "Value: " + ValueElement.getChildNodes().item(0).getNodeValue().replaceAll("\n","").trim() + " Node: " + i);}
|
||||||
postcode.setAdminCounty(ValueElement.getChildNodes().item(0).getNodeValue().replaceAll("\n","").trim());
|
postcode.setAdminCounty(ValueElement.getChildNodes().item(0).getNodeValue().replaceAll("\n","").trim());
|
||||||
}
|
}
|
||||||
// Found and ADMINCOUNTY Node
|
// Found and ADMINCOUNTY Node
|
||||||
if (NameElement.getChildNodes().item(0).getNodeValue().trim().equals("RESCODE")) {
|
if (NameElement.getChildNodes().item(0).getNodeValue().trim().equals("RESCODE")) {
|
||||||
NodeList firstValueList = firstElement.getElementsByTagName("Value");
|
NodeList firstValueList = firstElement.getElementsByTagName("Value");
|
||||||
Element ValueElement = (Element) firstValueList.item(0);
|
Element ValueElement = (Element) firstValueList.item(0);
|
||||||
log.log(Level.FINE, "Value: " + ValueElement.getChildNodes().item(0).getNodeValue().replaceAll("\n","").trim() + " Node: " + i);
|
if (log.isLoggable(Level.FINE)){log.log(Level.FINE, "Value: " + ValueElement.getChildNodes().item(0).getNodeValue().replaceAll("\n","").trim() + " Node: " + i);}
|
||||||
resultCode = (int) new Integer(ValueElement.getChildNodes().item(0).getNodeValue().replaceAll("\n","").trim());
|
resultCode = (int) new Integer(ValueElement.getChildNodes().item(0).getNodeValue().replaceAll("\n","").trim());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -53,7 +53,7 @@ public class DefaultProcessFactory implements IProcessFactory {
|
||||||
}
|
}
|
||||||
catch (ClassNotFoundException ex)
|
catch (ClassNotFoundException ex)
|
||||||
{
|
{
|
||||||
log.log(Level.FINE, className, ex);
|
if (log.isLoggable(Level.FINE))log.log(Level.FINE, className, ex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (processClass == null)
|
if (processClass == null)
|
||||||
|
|
|
@ -30,7 +30,7 @@ public class ResetLockedAccount extends SvrProcess {
|
||||||
else if (name.equals("AD_User_ID"))
|
else if (name.equals("AD_User_ID"))
|
||||||
p_AD_User_ID = element.getParameterAsInt();
|
p_AD_User_ID = element.getParameterAsInt();
|
||||||
else
|
else
|
||||||
log.log(Level.INFO, "Unknown Parameter: " + name);
|
if (log.isLoggable(Level.INFO))log.log(Level.INFO, "Unknown Parameter: " + name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -522,7 +522,7 @@ public abstract class Doc
|
||||||
}
|
}
|
||||||
catch (AverageCostingNegativeQtyException e)
|
catch (AverageCostingNegativeQtyException e)
|
||||||
{
|
{
|
||||||
log.log(Level.INFO, e.getLocalizedMessage(), e);
|
if (log.isLoggable(Level.INFO))log.log(Level.INFO, e.getLocalizedMessage(), e);
|
||||||
p_Status = STATUS_NotPosted;
|
p_Status = STATUS_NotPosted;
|
||||||
p_Error = e.toString();
|
p_Error = e.toString();
|
||||||
}
|
}
|
||||||
|
|
|
@ -199,7 +199,7 @@ public class Doc_MatchPO extends Doc
|
||||||
// Nothing to post
|
// Nothing to post
|
||||||
if (difference.signum() == 0)
|
if (difference.signum() == 0)
|
||||||
{
|
{
|
||||||
log.log(Level.FINE, "No Cost Difference for M_Product_ID=" + getM_Product_ID());
|
if (log.isLoggable(Level.FINE))log.log(Level.FINE, "No Cost Difference for M_Product_ID=" + getM_Product_ID());
|
||||||
return facts;
|
return facts;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2290,7 +2290,7 @@ public class GridTable extends AbstractTableModel
|
||||||
Object value = rowData[col];
|
Object value = rowData[col];
|
||||||
if (value == null)
|
if (value == null)
|
||||||
{
|
{
|
||||||
log.log(Level.INFO, "FK data is null - " + columnName);
|
if (log.isLoggable(Level.INFO))log.log(Level.INFO, "FK data is null - " + columnName);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (multiRowWHERE == null)
|
if (multiRowWHERE == null)
|
||||||
|
|
|
@ -124,7 +124,7 @@ public class MMediaServer extends X_CM_Media_Server
|
||||||
//
|
//
|
||||||
cmd = "list";
|
cmd = "list";
|
||||||
String[] fileNames = ftp.listNames();
|
String[] fileNames = ftp.listNames();
|
||||||
log.log(Level.FINE, "Number of files in " + getFolder() + ": " + fileNames.length);
|
if (log.isLoggable(Level.FINE))log.log(Level.FINE, "Number of files in " + getFolder() + ": " + fileNames.length);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
FTPFile[] files = ftp.listFiles();
|
FTPFile[] files = ftp.listFiles();
|
||||||
|
@ -138,7 +138,7 @@ public class MMediaServer extends X_CM_Media_Server
|
||||||
for (int i = 0; i < media.length; i++)
|
for (int i = 0; i < media.length; i++)
|
||||||
{
|
{
|
||||||
if (!media[i].isSummary()) {
|
if (!media[i].isSummary()) {
|
||||||
log.log(Level.INFO, " Deploying Media Item:" + media[i].get_ID() + media[i].getExtension());
|
if (log.isLoggable(Level.INFO))log.log(Level.INFO, " Deploying Media Item:" + media[i].get_ID() + media[i].getExtension());
|
||||||
MImage thisImage = media[i].getImage();
|
MImage thisImage = media[i].getImage();
|
||||||
|
|
||||||
// Open the file and output streams
|
// Open the file and output streams
|
||||||
|
|
|
@ -426,7 +426,7 @@ public class MProcess extends X_AD_Process
|
||||||
public void copyFrom (MProcess source)
|
public void copyFrom (MProcess source)
|
||||||
{
|
{
|
||||||
|
|
||||||
log.log(Level.FINE, "Copying from:" + source + ", to: " + this);
|
if (log.isLoggable(Level.FINE))log.log(Level.FINE, "Copying from:" + source + ", to: " + this);
|
||||||
setAccessLevel(source.getAccessLevel());
|
setAccessLevel(source.getAccessLevel());
|
||||||
setAD_Form_ID(source.getAD_Form_ID());
|
setAD_Form_ID(source.getAD_Form_ID());
|
||||||
setAD_PrintFormat_ID(source.getAD_PrintFormat_ID());
|
setAD_PrintFormat_ID(source.getAD_PrintFormat_ID());
|
||||||
|
|
|
@ -226,7 +226,7 @@ public class MProcessPara extends X_AD_Process_Para
|
||||||
public void copyFrom (MProcessPara source)
|
public void copyFrom (MProcessPara source)
|
||||||
{
|
{
|
||||||
|
|
||||||
log.log(Level.FINE, "Copying from:" + source + ", to: " + this);
|
if (log.isLoggable(Level.FINE))log.log(Level.FINE, "Copying from:" + source + ", to: " + this);
|
||||||
setAD_Element_ID(source.getAD_Element_ID());
|
setAD_Element_ID(source.getAD_Element_ID());
|
||||||
setAD_Reference_ID(source.getAD_Reference_ID());
|
setAD_Reference_ID(source.getAD_Reference_ID());
|
||||||
setAD_Reference_Value_ID(source.getAD_Reference_Value_ID());
|
setAD_Reference_Value_ID(source.getAD_Reference_Value_ID());
|
||||||
|
@ -254,7 +254,7 @@ public class MProcessPara extends X_AD_Process_Para
|
||||||
// delete new translations and copy translations from source
|
// delete new translations and copy translations from source
|
||||||
String sql = "DELETE FROM AD_Process_Para_Trl WHERE AD_Process_Para_ID = ?";
|
String sql = "DELETE FROM AD_Process_Para_Trl WHERE AD_Process_Para_ID = ?";
|
||||||
int count = DB.executeUpdateEx(sql, new Object[] { getAD_Process_Para_ID() }, get_TrxName());
|
int count = DB.executeUpdateEx(sql, new Object[] { getAD_Process_Para_ID() }, get_TrxName());
|
||||||
log.log(Level.FINE, "AD_Process_Para_Trl deleted: " + count);
|
if (log.isLoggable(Level.FINE))log.log(Level.FINE, "AD_Process_Para_Trl deleted: " + count);
|
||||||
|
|
||||||
sql = "INSERT INTO AD_Process_Para_Trl (AD_Process_Para_ID, AD_Language, " +
|
sql = "INSERT INTO AD_Process_Para_Trl (AD_Process_Para_ID, AD_Language, " +
|
||||||
" AD_Client_ID, AD_Org_ID, IsActive, Created, CreatedBy, Updated, UpdatedBy, " +
|
" AD_Client_ID, AD_Org_ID, IsActive, Created, CreatedBy, Updated, UpdatedBy, " +
|
||||||
|
@ -263,7 +263,7 @@ public class MProcessPara extends X_AD_Process_Para
|
||||||
" Updated, UpdatedBy, Name, Description, Help, IsTranslated " +
|
" Updated, UpdatedBy, Name, Description, Help, IsTranslated " +
|
||||||
" FROM AD_Process_Para_Trl WHERE AD_Process_Para_ID = ? ";
|
" FROM AD_Process_Para_Trl WHERE AD_Process_Para_ID = ? ";
|
||||||
count = DB.executeUpdateEx(sql, new Object[] { getAD_Process_Para_ID(), source.getAD_Process_Para_ID() }, get_TrxName());
|
count = DB.executeUpdateEx(sql, new Object[] { getAD_Process_Para_ID(), source.getAD_Process_Para_ID() }, get_TrxName());
|
||||||
log.log(Level.FINE, "AD_Process_Para_Trl inserted: " + count);
|
if (log.isLoggable(Level.FINE))log.log(Level.FINE, "AD_Process_Para_Trl inserted: " + count);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -69,14 +69,14 @@ public class MProductionLine extends X_M_ProductionLine {
|
||||||
public String createTransactions(Timestamp date, boolean mustBeStocked) {
|
public String createTransactions(Timestamp date, boolean mustBeStocked) {
|
||||||
// delete existing ASI records
|
// delete existing ASI records
|
||||||
int deleted = deleteMA();
|
int deleted = deleteMA();
|
||||||
log.log(Level.FINE, "Deleted " + deleted + " attribute records ");
|
if (log.isLoggable(Level.FINE))log.log(Level.FINE, "Deleted " + deleted + " attribute records ");
|
||||||
|
|
||||||
MProduct prod = new MProduct(getCtx(), getM_Product_ID(), get_TrxName());
|
MProduct prod = new MProduct(getCtx(), getM_Product_ID(), get_TrxName());
|
||||||
log.log(Level.FINE,"Loaded Product " + prod.toString());
|
if (log.isLoggable(Level.FINE))log.log(Level.FINE,"Loaded Product " + prod.toString());
|
||||||
|
|
||||||
if ( prod.getProductType().compareTo(MProduct.PRODUCTTYPE_Item ) != 0 ) {
|
if ( prod.getProductType().compareTo(MProduct.PRODUCTTYPE_Item ) != 0 ) {
|
||||||
// no need to do any movements
|
// no need to do any movements
|
||||||
log.log(Level.FINE, "Production Line " + getLine() + " does not require stock movement");
|
if (log.isLoggable(Level.FINE))log.log(Level.FINE, "Production Line " + getLine() + " does not require stock movement");
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
StringBuilder errorString = new StringBuilder();
|
StringBuilder errorString = new StringBuilder();
|
||||||
|
@ -86,7 +86,7 @@ public class MProductionLine extends X_M_ProductionLine {
|
||||||
if ( asiString == null )
|
if ( asiString == null )
|
||||||
asiString = "";
|
asiString = "";
|
||||||
|
|
||||||
log.log(Level.FINEST, "asi Description is: " + asiString);
|
if (log.isLoggable(Level.FINEST)) log.log(Level.FINEST, "asi Description is: " + asiString);
|
||||||
// create transactions for finished goods
|
// create transactions for finished goods
|
||||||
if ( getMovementQty().compareTo(Env.ZERO) > 0 ) {
|
if ( getMovementQty().compareTo(Env.ZERO) > 0 ) {
|
||||||
MProductionLineMA lineMA = new MProductionLineMA( this,
|
MProductionLineMA lineMA = new MProductionLineMA( this,
|
||||||
|
@ -111,7 +111,7 @@ public class MProductionLine extends X_M_ProductionLine {
|
||||||
log.log(Level.SEVERE, "Could not update storage for " + toString());
|
log.log(Level.SEVERE, "Could not update storage for " + toString());
|
||||||
errorString.append("Could not save transaction for " + toString() + "\n");
|
errorString.append("Could not save transaction for " + toString() + "\n");
|
||||||
}
|
}
|
||||||
log.log(Level.FINE, "Created finished goods line " + getLine());
|
if (log.isLoggable(Level.FINE))log.log(Level.FINE, "Created finished goods line " + getLine());
|
||||||
|
|
||||||
return errorString.toString();
|
return errorString.toString();
|
||||||
}
|
}
|
||||||
|
@ -129,7 +129,7 @@ public class MProductionLine extends X_M_ProductionLine {
|
||||||
|
|
||||||
BigDecimal lineQty = storages[sl].getQtyOnHand();
|
BigDecimal lineQty = storages[sl].getQtyOnHand();
|
||||||
|
|
||||||
log.log(Level.FINE, "QtyAvailable " + lineQty );
|
if (log.isLoggable(Level.FINE))log.log(Level.FINE, "QtyAvailable " + lineQty );
|
||||||
if (lineQty.signum() > 0)
|
if (lineQty.signum() > 0)
|
||||||
{
|
{
|
||||||
if (lineQty.compareTo(qtyToMove ) > 0)
|
if (lineQty.compareTo(qtyToMove ) > 0)
|
||||||
|
@ -141,7 +141,7 @@ public class MProductionLine extends X_M_ProductionLine {
|
||||||
if (slASIString == null)
|
if (slASIString == null)
|
||||||
slASIString = "";
|
slASIString = "";
|
||||||
|
|
||||||
log.log(Level.FINEST,"slASI-Description =" + slASIString);
|
if (log.isLoggable(Level.FINEST))log.log(Level.FINEST,"slASI-Description =" + slASIString);
|
||||||
|
|
||||||
if ( slASIString.compareTo(asiString) == 0
|
if ( slASIString.compareTo(asiString) == 0
|
||||||
|| asi.getM_AttributeSet_ID() == 0 )
|
|| asi.getM_AttributeSet_ID() == 0 )
|
||||||
|
@ -153,9 +153,9 @@ public class MProductionLine extends X_M_ProductionLine {
|
||||||
if ( !lineMA.save(get_TrxName()) ) {
|
if ( !lineMA.save(get_TrxName()) ) {
|
||||||
log.log(Level.SEVERE, "Could not save MA for " + toString());
|
log.log(Level.SEVERE, "Could not save MA for " + toString());
|
||||||
errorString.append("Could not save MA for " + toString() + "\n" );
|
errorString.append("Could not save MA for " + toString() + "\n" );
|
||||||
|
} else {
|
||||||
|
if (log.isLoggable(Level.FINE))log.log(Level.FINE, "Saved MA for " + toString());
|
||||||
}
|
}
|
||||||
else
|
|
||||||
log.log(Level.FINE, "Saved MA for " + toString());
|
|
||||||
matTrx = new MTransaction (getCtx(), getAD_Org_ID(),
|
matTrx = new MTransaction (getCtx(), getAD_Org_ID(),
|
||||||
"P-",
|
"P-",
|
||||||
getM_Locator_ID(), getM_Product_ID(), asi.get_ID(),
|
getM_Locator_ID(), getM_Product_ID(), asi.get_ID(),
|
||||||
|
@ -164,16 +164,16 @@ public class MProductionLine extends X_M_ProductionLine {
|
||||||
if ( !matTrx.save(get_TrxName()) ) {
|
if ( !matTrx.save(get_TrxName()) ) {
|
||||||
log.log(Level.SEVERE, "Could not save transaction for " + toString());
|
log.log(Level.SEVERE, "Could not save transaction for " + toString());
|
||||||
errorString.append("Could not save transaction for " + toString() + "\n");
|
errorString.append("Could not save transaction for " + toString() + "\n");
|
||||||
|
} else {
|
||||||
|
if (log.isLoggable(Level.FINE))log.log(Level.FINE, "Saved transaction for " + toString());
|
||||||
}
|
}
|
||||||
else
|
|
||||||
log.log(Level.FINE, "Saved transaction for " + toString());
|
|
||||||
storages[sl].changeQtyOnHand(lineQty, false);
|
storages[sl].changeQtyOnHand(lineQty, false);
|
||||||
if ( !storages[sl].save(get_TrxName()) ) {
|
if ( !storages[sl].save(get_TrxName()) ) {
|
||||||
log.log(Level.SEVERE, "Could not update storage for " + toString());
|
log.log(Level.SEVERE, "Could not update storage for " + toString());
|
||||||
errorString.append("Could not update storage for " + toString() + "\n");
|
errorString.append("Could not update storage for " + toString() + "\n");
|
||||||
}
|
}
|
||||||
qtyToMove = qtyToMove.subtract(lineQty);
|
qtyToMove = qtyToMove.subtract(lineQty);
|
||||||
log.log(Level.FINE, getLine() + " Qty moved = " + lineQty + ", Remaining = " + qtyToMove );
|
if (log.isLoggable(Level.FINE))log.log(Level.FINE, getLine() + " Qty moved = " + lineQty + ", Remaining = " + qtyToMove );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -210,7 +210,7 @@ public class MProductionLine extends X_M_ProductionLine {
|
||||||
if (slASIString == null)
|
if (slASIString == null)
|
||||||
slASIString = "";
|
slASIString = "";
|
||||||
|
|
||||||
log.log(Level.FINEST,"slASI-Description =" + slASIString);
|
if (log.isLoggable(Level.FINEST))log.log(Level.FINEST,"slASI-Description =" + slASIString);
|
||||||
|
|
||||||
if ( slASIString.compareTo(asiString) == 0
|
if ( slASIString.compareTo(asiString) == 0
|
||||||
|| asi.getM_AttributeSet_ID() == 0 )
|
|| asi.getM_AttributeSet_ID() == 0 )
|
||||||
|
@ -226,9 +226,9 @@ public class MProductionLine extends X_M_ProductionLine {
|
||||||
if ( !lineMA.save(get_TrxName()) ) {
|
if ( !lineMA.save(get_TrxName()) ) {
|
||||||
log.log(Level.SEVERE, "Could not save MA for " + toString());
|
log.log(Level.SEVERE, "Could not save MA for " + toString());
|
||||||
errorString.append("Could not save MA for " + toString() + "\n" );
|
errorString.append("Could not save MA for " + toString() + "\n" );
|
||||||
|
} else {
|
||||||
|
if (log.isLoggable(Level.FINE))log.log(Level.FINE, "Saved MA for " + toString());
|
||||||
}
|
}
|
||||||
else
|
|
||||||
log.log(Level.FINE, "Saved MA for " + toString());
|
|
||||||
matTrx = new MTransaction (getCtx(), getAD_Org_ID(),
|
matTrx = new MTransaction (getCtx(), getAD_Org_ID(),
|
||||||
"P-",
|
"P-",
|
||||||
getM_Locator_ID(), getM_Product_ID(), asi.get_ID(),
|
getM_Locator_ID(), getM_Product_ID(), asi.get_ID(),
|
||||||
|
@ -237,16 +237,16 @@ public class MProductionLine extends X_M_ProductionLine {
|
||||||
if ( !matTrx.save(get_TrxName()) ) {
|
if ( !matTrx.save(get_TrxName()) ) {
|
||||||
log.log(Level.SEVERE, "Could not save transaction for " + toString());
|
log.log(Level.SEVERE, "Could not save transaction for " + toString());
|
||||||
errorString.append("Could not save transaction for " + toString() + "\n");
|
errorString.append("Could not save transaction for " + toString() + "\n");
|
||||||
|
} else {
|
||||||
|
if (log.isLoggable(Level.FINE))log.log(Level.FINE, "Saved transaction for " + toString());
|
||||||
}
|
}
|
||||||
else
|
|
||||||
log.log(Level.FINE, "Saved transaction for " + toString());
|
|
||||||
storage.changeQtyOnHand(lineQty, false);
|
storage.changeQtyOnHand(lineQty, false);
|
||||||
if ( !storage.save(get_TrxName()) ) {
|
if ( !storage.save(get_TrxName()) ) {
|
||||||
log.log(Level.SEVERE, "Could not update storage for " + toString());
|
log.log(Level.SEVERE, "Could not update storage for " + toString());
|
||||||
errorString.append("Could not update storage for " + toString() + "\n");
|
errorString.append("Could not update storage for " + toString() + "\n");
|
||||||
}
|
}
|
||||||
qtyToMove = qtyToMove.subtract(lineQty);
|
qtyToMove = qtyToMove.subtract(lineQty);
|
||||||
log.log(Level.FINE, getLine() + " Qty moved = " + lineQty + ", Remaining = " + qtyToMove );
|
if (log.isLoggable(Level.FINE))log.log(Level.FINE, getLine() + " Qty moved = " + lineQty + ", Remaining = " + qtyToMove );
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -71,7 +71,7 @@ public class MReportCube extends X_PA_ReportCube {
|
||||||
start = System.currentTimeMillis();
|
start = System.currentTimeMillis();
|
||||||
KeyNamePair[] changedPeriods = DB.getKeyNamePairs(sql, false, getPA_ReportCube_ID());
|
KeyNamePair[] changedPeriods = DB.getKeyNamePairs(sql, false, getPA_ReportCube_ID());
|
||||||
elapsed = (System.currentTimeMillis() - start)/1000;
|
elapsed = (System.currentTimeMillis() - start)/1000;
|
||||||
log.log(Level.FINE, "Selecting changed periods took:" + elapsed + "s");
|
if (log.isLoggable(Level.FINE))log.log(Level.FINE, "Selecting changed periods took:" + elapsed + "s");
|
||||||
|
|
||||||
if (changedPeriods != null && changedPeriods.length > 0 )
|
if (changedPeriods != null && changedPeriods.length > 0 )
|
||||||
{
|
{
|
||||||
|
@ -84,7 +84,7 @@ public class MReportCube extends X_PA_ReportCube {
|
||||||
periodList.delete(periodList.length() - 2, periodList.length());
|
periodList.delete(periodList.length() - 2, periodList.length());
|
||||||
periodList.append(" )");
|
periodList.append(" )");
|
||||||
|
|
||||||
log.log(Level.FINE, "Periods requiring update: " + periodNames.toString());
|
if (log.isLoggable(Level.FINE))log.log(Level.FINE, "Periods requiring update: " + periodNames.toString());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return "Nothing to update in " + getName();
|
return "Nothing to update in " + getName();
|
||||||
|
@ -108,13 +108,13 @@ public class MReportCube extends X_PA_ReportCube {
|
||||||
{
|
{
|
||||||
// delete
|
// delete
|
||||||
String delSQL = "DELETE FROM Fact_Acct_Summary fas " + where;
|
String delSQL = "DELETE FROM Fact_Acct_Summary fas " + where;
|
||||||
log.log(Level.FINE, "Delete sql: " + delSQL);
|
if (log.isLoggable(Level.FINE))log.log(Level.FINE, "Delete sql: " + delSQL);
|
||||||
start = System.currentTimeMillis();
|
start = System.currentTimeMillis();
|
||||||
int deleted = DB.executeUpdateEx(delSQL, get_TrxName());
|
int deleted = DB.executeUpdateEx(delSQL, get_TrxName());
|
||||||
elapsed = (System.currentTimeMillis() - start)/1000;
|
elapsed = (System.currentTimeMillis() - start)/1000;
|
||||||
result += "Deleted " + deleted + " in " + elapsed + " s;";
|
result += "Deleted " + deleted + " in " + elapsed + " s;";
|
||||||
|
|
||||||
log.log(Level.FINE, result);
|
if (log.isLoggable(Level.FINE))log.log(Level.FINE, result);
|
||||||
|
|
||||||
// insert
|
// insert
|
||||||
StringBuilder insert = new StringBuilder("INSERT " +
|
StringBuilder insert = new StringBuilder("INSERT " +
|
||||||
|
@ -189,7 +189,7 @@ public class MReportCube extends X_PA_ReportCube {
|
||||||
|
|
||||||
|
|
||||||
String sql = insert.append(select.toString()).append(from).append(groups.toString()).toString();
|
String sql = insert.append(select.toString()).append(from).append(groups.toString()).toString();
|
||||||
log.log(Level.FINE, sql);
|
if (log.isLoggable(Level.FINE))log.log(Level.FINE, sql);
|
||||||
Object[] params = new Object[] { getPA_ReportCube_ID(), getC_Calendar_ID() };
|
Object[] params = new Object[] { getPA_ReportCube_ID(), getC_Calendar_ID() };
|
||||||
|
|
||||||
start = System.currentTimeMillis();
|
start = System.currentTimeMillis();
|
||||||
|
@ -197,7 +197,7 @@ public class MReportCube extends X_PA_ReportCube {
|
||||||
long seconds = (System.currentTimeMillis() - start)/1000;
|
long seconds = (System.currentTimeMillis() - start)/1000;
|
||||||
|
|
||||||
String insertResult = "Inserted " + rows + " in " + seconds + " s.";
|
String insertResult = "Inserted " + rows + " in " + seconds + " s.";
|
||||||
log.log(Level.FINE, insertResult);
|
if (log.isLoggable(Level.FINE))log.log(Level.FINE, insertResult);
|
||||||
result += insertResult;
|
result += insertResult;
|
||||||
|
|
||||||
|
|
||||||
|
@ -206,14 +206,14 @@ public class MReportCube extends X_PA_ReportCube {
|
||||||
" FROM Fact_Acct_Summary fas" +
|
" FROM Fact_Acct_Summary fas" +
|
||||||
" WHERE fas.PA_ReportCube_ID = " + getPA_ReportCube_ID();
|
" WHERE fas.PA_ReportCube_ID = " + getPA_ReportCube_ID();
|
||||||
ts = DB.getSQLValueTS(get_TrxName(), tsSQL);
|
ts = DB.getSQLValueTS(get_TrxName(), tsSQL);
|
||||||
log.log(Level.FINE, "Last updated: " + ts);
|
if (log.isLoggable(Level.FINE))log.log(Level.FINE, "Last updated: " + ts);
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (DBException e)
|
catch (DBException e)
|
||||||
{
|
{
|
||||||
// failure results in null timestamp => rebuild on next run
|
// failure results in null timestamp => rebuild on next run
|
||||||
// nothing else to do
|
// nothing else to do
|
||||||
log.log(Level.FINE, getName() + " update failed:" + e.getMessage());
|
if (log.isLoggable(Level.FINE))log.log(Level.FINE, getName() + " update failed:" + e.getMessage());
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
|
|
|
@ -1305,7 +1305,7 @@ public class MSequence extends X_AD_Sequence
|
||||||
System.err.println(e);
|
System.err.println(e);
|
||||||
retValue = -1;
|
retValue = -1;
|
||||||
}
|
}
|
||||||
s_log.log(Level.INFO, "getNextID_HTTP - " + TableName + "=" + read + "(" + retValue + ")");
|
if (s_log.isLoggable(Level.INFO))s_log.log(Level.INFO, "getNextID_HTTP - " + TableName + "=" + read + "(" + retValue + ")");
|
||||||
|
|
||||||
return retValue;
|
return retValue;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1034,7 +1034,7 @@ public abstract class PO
|
||||||
else // if (value instanceof String)
|
else // if (value instanceof String)
|
||||||
valueString = DB.TO_STRING(value.toString());
|
valueString = DB.TO_STRING(value.toString());
|
||||||
// Save it
|
// Save it
|
||||||
log.log(Level.INFO, columnName + "=" + valueString);
|
if (log.isLoggable(Level.INFO))log.log(Level.INFO, columnName + "=" + valueString);
|
||||||
m_custom.put(columnName, valueString);
|
m_custom.put(columnName, valueString);
|
||||||
return true;
|
return true;
|
||||||
} // set_CustomColumn
|
} // set_CustomColumn
|
||||||
|
@ -1408,10 +1408,9 @@ public abstract class PO
|
||||||
}
|
}
|
||||||
catch (SQLException e)
|
catch (SQLException e)
|
||||||
{
|
{
|
||||||
if (p_info.isVirtualColumn(index)) // if rs constructor used
|
if (p_info.isVirtualColumn(index)) { // if rs constructor used
|
||||||
log.log(Level.FINER, "Virtual Column not loaded: " + columnName);
|
if (log.isLoggable(Level.FINER))log.log(Level.FINER, "Virtual Column not loaded: " + columnName);
|
||||||
else
|
} else {
|
||||||
{
|
|
||||||
log.log(Level.SEVERE, "(rs) - " + String.valueOf(index)
|
log.log(Level.SEVERE, "(rs) - " + String.valueOf(index)
|
||||||
+ ": " + p_info.getTableName() + "." + p_info.getColumnName(index)
|
+ ": " + p_info.getTableName() + "." + p_info.getColumnName(index)
|
||||||
+ " (" + p_info.getColumnClass(index) + ") - " + e);
|
+ " (" + p_info.getColumnClass(index) + ") - " + e);
|
||||||
|
@ -1468,10 +1467,9 @@ public abstract class PO
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
if (p_info.isVirtualColumn(index)) // if rs constructor used
|
if (p_info.isVirtualColumn(index)) { // if rs constructor used
|
||||||
log.log(Level.FINER, "Virtual Column not loaded: " + columnName);
|
if (log.isLoggable(Level.FINER))log.log(Level.FINER, "Virtual Column not loaded: " + columnName);
|
||||||
else
|
} else {
|
||||||
{
|
|
||||||
log.log(Level.SEVERE, "(ht) - " + String.valueOf(index)
|
log.log(Level.SEVERE, "(ht) - " + String.valueOf(index)
|
||||||
+ ": " + p_info.getTableName() + "." + p_info.getColumnName(index)
|
+ ": " + p_info.getTableName() + "." + p_info.getColumnName(index)
|
||||||
+ " (" + p_info.getColumnClass(index) + ") - " + e);
|
+ " (" + p_info.getColumnClass(index) + ") - " + e);
|
||||||
|
|
|
@ -80,7 +80,7 @@ public class FactReconcile extends SvrProcess
|
||||||
else
|
else
|
||||||
subselect = rule.getScript();
|
subselect = rule.getScript();
|
||||||
|
|
||||||
log.log(Level.FINE, "Rule subselect: " + subselect);
|
if (log.isLoggable(Level.FINE))log.log(Level.FINE, "Rule subselect: " + subselect);
|
||||||
|
|
||||||
|
|
||||||
/* example matching rules:
|
/* example matching rules:
|
||||||
|
@ -144,7 +144,7 @@ public class FactReconcile extends SvrProcess
|
||||||
pstmt.setInt(1, seq.getAD_Sequence_ID());
|
pstmt.setInt(1, seq.getAD_Sequence_ID());
|
||||||
pstmt.setInt(2, account.get_ID());
|
pstmt.setInt(2, account.get_ID());
|
||||||
count = pstmt.executeUpdate();
|
count = pstmt.executeUpdate();
|
||||||
log.log(Level.FINE, "Inserted " + count + " new facts into Fact_Reconciliation");
|
if (log.isLoggable(Level.FINE))log.log(Level.FINE, "Inserted " + count + " new facts into Fact_Reconciliation");
|
||||||
|
|
||||||
// set the matchcode based on the rule found in AD_Rule
|
// set the matchcode based on the rule found in AD_Rule
|
||||||
// which is a sql fragment that returns a string based on the accounting fact
|
// which is a sql fragment that returns a string based on the accounting fact
|
||||||
|
@ -161,7 +161,7 @@ public class FactReconcile extends SvrProcess
|
||||||
pstmt.setInt(1, account.get_ID());
|
pstmt.setInt(1, account.get_ID());
|
||||||
count = pstmt.executeUpdate();
|
count = pstmt.executeUpdate();
|
||||||
|
|
||||||
log.log(Level.FINE, "Updated " + count + " match codes.");
|
if (log.isLoggable(Level.FINE))log.log(Level.FINE, "Updated " + count + " match codes.");
|
||||||
|
|
||||||
// remove any matchcodes that don't balance to zero
|
// remove any matchcodes that don't balance to zero
|
||||||
sql = "UPDATE Fact_Reconciliation " +
|
sql = "UPDATE Fact_Reconciliation " +
|
||||||
|
@ -179,7 +179,7 @@ public class FactReconcile extends SvrProcess
|
||||||
pstmt.setInt(2, account.get_ID());
|
pstmt.setInt(2, account.get_ID());
|
||||||
unmatched = pstmt.executeUpdate();
|
unmatched = pstmt.executeUpdate();
|
||||||
|
|
||||||
log.log(Level.FINE, "Cleared match codes from " + unmatched + " unreconciled facts.");
|
if (log.isLoggable(Level.FINE))log.log(Level.FINE, "Cleared match codes from " + unmatched + " unreconciled facts.");
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (SQLException e)
|
catch (SQLException e)
|
||||||
|
|
|
@ -79,7 +79,7 @@ public class FactReconciliation extends SvrProcess
|
||||||
int count = pstmt.executeUpdate();
|
int count = pstmt.executeUpdate();
|
||||||
String result = Msg.getMsg(getCtx(),"@Created@") + ": " + count + ", ";
|
String result = Msg.getMsg(getCtx(),"@Created@") + ": " + count + ", ";
|
||||||
|
|
||||||
log.log(Level.FINE, result);
|
if (log.isLoggable(Level.FINE))log.log(Level.FINE, result);
|
||||||
|
|
||||||
sql = "DELETE FROM T_Reconciliation t " +
|
sql = "DELETE FROM T_Reconciliation t " +
|
||||||
"WHERE (SELECT SUM(f.amtacctdr-f.amtacctcr) FROM T_Reconciliation r " +
|
"WHERE (SELECT SUM(f.amtacctdr-f.amtacctcr) FROM T_Reconciliation r " +
|
||||||
|
@ -93,7 +93,7 @@ public class FactReconciliation extends SvrProcess
|
||||||
count = pstmt.executeUpdate();
|
count = pstmt.executeUpdate();
|
||||||
result = Msg.getMsg(getCtx(), "@Deleted@") + ": " + count;
|
result = Msg.getMsg(getCtx(), "@Deleted@") + ": " + count;
|
||||||
|
|
||||||
log.log(Level.FINE, result);
|
if (log.isLoggable(Level.FINE))log.log(Level.FINE, result);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -276,7 +276,7 @@ public class FinReport extends SvrProcess
|
||||||
{
|
{
|
||||||
MReportCube cube = new MReportCube(getCtx(), p_PA_ReportCube_ID, get_TrxName());
|
MReportCube cube = new MReportCube(getCtx(), p_PA_ReportCube_ID, get_TrxName());
|
||||||
String result = cube.update(false, false);
|
String result = cube.update(false, false);
|
||||||
log.log(Level.FINE, result);
|
if (log.isLoggable(Level.FINE))log.log(Level.FINE, result);
|
||||||
}
|
}
|
||||||
// ** Create Temporary and empty Report Lines from PA_ReportLine
|
// ** Create Temporary and empty Report Lines from PA_ReportLine
|
||||||
// - AD_PInstance_ID, PA_ReportLine_ID, 0, 0
|
// - AD_PInstance_ID, PA_ReportLine_ID, 0, 0
|
||||||
|
|
|
@ -230,7 +230,7 @@ public class CLogMgt
|
||||||
Logger rootLogger = getRootLogger();
|
Logger rootLogger = getRootLogger();
|
||||||
rootLogger.addHandler(handler);
|
rootLogger.addHandler(handler);
|
||||||
//
|
//
|
||||||
log.log(Level.CONFIG, "Handler=" + handler);
|
if (log.isLoggable(Level.CONFIG))log.log(Level.CONFIG, "Handler=" + handler);
|
||||||
} // addHandler
|
} // addHandler
|
||||||
|
|
||||||
|
|
||||||
|
@ -246,7 +246,7 @@ public class CLogMgt
|
||||||
{
|
{
|
||||||
handlers[i].setFormatter(formatter);
|
handlers[i].setFormatter(formatter);
|
||||||
}
|
}
|
||||||
log.log(Level.CONFIG, "Formatter=" + formatter);
|
if (log.isLoggable(Level.CONFIG))log.log(Level.CONFIG, "Formatter=" + formatter);
|
||||||
} // setFormatter
|
} // setFormatter
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -261,7 +261,7 @@ public class CLogMgt
|
||||||
{
|
{
|
||||||
handlers[i].setFilter(filter);
|
handlers[i].setFilter(filter);
|
||||||
}
|
}
|
||||||
log.log(Level.CONFIG, "Filter=" + filter);
|
if (log.isLoggable(Level.CONFIG))log.log(Level.CONFIG, "Filter=" + filter);
|
||||||
} // setFilter
|
} // setFilter
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -362,7 +362,7 @@ public class CLogMgt
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
log.log(Level.CONFIG, "Ignored: " + levelString);
|
if (log.isLoggable(Level.CONFIG))log.log(Level.CONFIG, "Ignored: " + levelString);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -793,8 +793,10 @@ public class CLogMgt
|
||||||
{
|
{
|
||||||
log1.log(Level.SEVERE, "error message", e);
|
log1.log(Level.SEVERE, "error message", e);
|
||||||
}
|
}
|
||||||
log1.log(Level.INFO, "info message 1", "1Param");
|
if (log1.isLoggable(Level.INFO)){
|
||||||
log1.log(Level.INFO, "info message n", new Object[]{"1Param","2Param"});
|
log1.log(Level.INFO, "info message 1", "1Param");
|
||||||
|
log1.log(Level.INFO, "info message n", new Object[]{"1Param","2Param"});
|
||||||
|
}
|
||||||
} // testLog
|
} // testLog
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1847,7 +1847,7 @@ public final class DB
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (noIsSOTrxColumn)
|
if (noIsSOTrxColumn)
|
||||||
log.log(Level.FINEST, TableName + " - No SOTrx");
|
if (log.isLoggable(Level.FINEST))log.log(Level.FINEST, TableName + " - No SOTrx");
|
||||||
return isSOTrx;
|
return isSOTrx;
|
||||||
} // isSOTrx
|
} // isSOTrx
|
||||||
|
|
||||||
|
|
|
@ -434,7 +434,7 @@ public final class Msg
|
||||||
}
|
}
|
||||||
catch (ClassNotFoundException e)
|
catch (ClassNotFoundException e)
|
||||||
{
|
{
|
||||||
s_log.log(Level.FINER, "Class not found: " + className);
|
if (s_log.isLoggable(Level.FINER))s_log.log(Level.FINER, "Class not found: " + className);
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
|
|
@ -179,7 +179,7 @@ public class Secure implements SecureInterface
|
||||||
return encString;
|
return encString;
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
// log.log(Level.INFO, value, ex);
|
// log.log(Level.INFO, value, ex);
|
||||||
log.log(Level.INFO, "Problem encrypting string", ex);
|
if (log.isLoggable(Level.INFO))log.log(Level.INFO, "Problem encrypting string", ex);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fallback
|
// Fallback
|
||||||
|
|
|
@ -136,7 +136,7 @@ public class Task extends Thread
|
||||||
}
|
}
|
||||||
catch (InterruptedException ie)
|
catch (InterruptedException ie)
|
||||||
{
|
{
|
||||||
log.log(Level.INFO, "(ie) - " + ie);
|
if (log.isLoggable(Level.INFO))log.log(Level.INFO, "(ie) - " + ie);
|
||||||
}
|
}
|
||||||
// ExitValue
|
// ExitValue
|
||||||
try
|
try
|
||||||
|
|
|
@ -173,7 +173,7 @@ public class Trx
|
||||||
*/
|
*/
|
||||||
public Connection getConnection(boolean createNew)
|
public Connection getConnection(boolean createNew)
|
||||||
{
|
{
|
||||||
log.log(Level.ALL, "Active=" + isActive() + ", Connection=" + m_connection);
|
if (log.isLoggable(Level.ALL))log.log(Level.ALL, "Active=" + isActive() + ", Connection=" + m_connection);
|
||||||
|
|
||||||
if (m_connection == null) // get new Connection
|
if (m_connection == null) // get new Connection
|
||||||
{
|
{
|
||||||
|
|
|
@ -264,8 +264,8 @@ public final class WebUtil
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
String dataEnc = new String(data.getBytes(enc), WebEnv.ENCODING);
|
String dataEnc = new String(data.getBytes(enc), WebEnv.ENCODING);
|
||||||
log.log(Level.FINER, "Convert " + data + " (" + enc + ")-> "
|
if (log.isLoggable(Level.FINER))log.log(Level.FINER, "Convert " + data + " (" + enc + ")-> "
|
||||||
+ dataEnc + " (" + WebEnv.ENCODING + ")");
|
+ dataEnc + " (" + WebEnv.ENCODING + ")");
|
||||||
data = dataEnc;
|
data = dataEnc;
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
|
|
|
@ -25,11 +25,11 @@ public class FileElementHandler implements ElementHandler {
|
||||||
TransformerHandler docHandler, int recordId) throws Exception {
|
TransformerHandler docHandler, int recordId) throws Exception {
|
||||||
PackoutDocument header = packout.getPackoutDocument();
|
PackoutDocument header = packout.getPackoutDocument();
|
||||||
PackoutItem detail = packout.getCurrentPackoutItem();
|
PackoutItem detail = packout.getCurrentPackoutItem();
|
||||||
log.log(Level.INFO,
|
if (log.isLoggable(Level.INFO))log.log(Level.INFO,
|
||||||
"In PackOut.java handling Code or Other 2pack module creation");
|
"In PackOut.java handling Code or Other 2pack module creation");
|
||||||
String fileDirectory = packout.getPackoutDirectory() + header.getPackageName()
|
String fileDirectory = packout.getPackoutDirectory() + header.getPackageName()
|
||||||
+ detail.getProperty(FileElementParameters.TARGET_DIRECTORY);
|
+ detail.getProperty(FileElementParameters.TARGET_DIRECTORY);
|
||||||
log.log(Level.INFO, "targetDirectory" + fileDirectory);
|
if (log.isLoggable(Level.INFO))log.log(Level.INFO, "targetDirectory" + fileDirectory);
|
||||||
String targetDirectory = null;
|
String targetDirectory = null;
|
||||||
char fileseperator1 = '/';
|
char fileseperator1 = '/';
|
||||||
char fileseperator2 = '\\';
|
char fileseperator2 = '\\';
|
||||||
|
|
|
@ -80,11 +80,11 @@ public class LdapProcessor extends AdempiereServer
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
m_serverSocket = new ServerSocket(m_model.getLdapPort());
|
m_serverSocket = new ServerSocket(m_model.getLdapPort());
|
||||||
log.log(Level.INFO, "Opened Port=" + m_model.getLdapPort());
|
if (log.isLoggable(Level.INFO))log.log(Level.INFO, "Opened Port=" + m_model.getLdapPort());
|
||||||
while (!isInterrupted())
|
while (!isInterrupted())
|
||||||
{
|
{
|
||||||
Socket socket = m_serverSocket.accept(); // waits for connection
|
Socket socket = m_serverSocket.accept(); // waits for connection
|
||||||
log.log(Level.FINE, "Connection on Port=" + m_model.getLdapPort());
|
if (log.isLoggable(Level.FINE))log.log(Level.FINE, "Connection on Port=" + m_model.getLdapPort());
|
||||||
LdapConnectionHandler handler =
|
LdapConnectionHandler handler =
|
||||||
new LdapConnectionHandler (socket, m_model);
|
new LdapConnectionHandler (socket, m_model);
|
||||||
handler.start();
|
handler.start();
|
||||||
|
|
|
@ -1497,7 +1497,7 @@ public final class Find extends CDialog
|
||||||
private Object parseString(GridField field, String in)
|
private Object parseString(GridField field, String in)
|
||||||
{
|
{
|
||||||
StringBuilder msglog = new StringBuilder("Parse: ").append(field).append(":").append(in);
|
StringBuilder msglog = new StringBuilder("Parse: ").append(field).append(":").append(in);
|
||||||
log.log(Level.FINE, msglog.toString());
|
if (log.isLoggable(Level.FINE))log.log(Level.FINE, msglog.toString());
|
||||||
if (in == null)
|
if (in == null)
|
||||||
return null;
|
return null;
|
||||||
int dt = field.getDisplayType();
|
int dt = field.getDisplayType();
|
||||||
|
|
|
@ -142,7 +142,7 @@ public class POSKeyboard extends CDialog implements ActionListener, PosKeyListen
|
||||||
try {
|
try {
|
||||||
text.commitEdit();
|
text.commitEdit();
|
||||||
} catch (ParseException e1) {
|
} catch (ParseException e1) {
|
||||||
log.log(Level.FINE, "JFormattedTextField commit failed");
|
if (log.isLoggable(Level.FINE))log.log(Level.FINE, "JFormattedTextField commit failed");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ( action.equals(ConfirmPanel.A_CANCEL))
|
else if ( action.equals(ConfirmPanel.A_CANCEL))
|
||||||
|
@ -155,7 +155,7 @@ public class POSKeyboard extends CDialog implements ActionListener, PosKeyListen
|
||||||
try {
|
try {
|
||||||
field.commitEdit();
|
field.commitEdit();
|
||||||
} catch (ParseException e1) {
|
} catch (ParseException e1) {
|
||||||
log.log(Level.FINE, "JFormattedTextField commit failed");
|
if (log.isLoggable(Level.FINE))log.log(Level.FINE, "JFormattedTextField commit failed");
|
||||||
}
|
}
|
||||||
dispose();
|
dispose();
|
||||||
}
|
}
|
||||||
|
@ -242,7 +242,7 @@ public class POSKeyboard extends CDialog implements ActionListener, PosKeyListen
|
||||||
try {
|
try {
|
||||||
text.commitEdit();
|
text.commitEdit();
|
||||||
} catch (ParseException e) {
|
} catch (ParseException e) {
|
||||||
log.log(Level.FINE, "JFormattedTextField commit failed");
|
if (log.isLoggable(Level.FINE))log.log(Level.FINE, "JFormattedTextField commit failed");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -818,7 +818,7 @@ public class ProcessDialog extends Window implements EventListener<Event>, IProc
|
||||||
|
|
||||||
protected void doRun() {
|
protected void doRun() {
|
||||||
try {
|
try {
|
||||||
log.log(Level.INFO, "Process Info="+m_pi+" AD_Client_ID="+Env.getAD_Client_ID(Env.getCtx()));
|
if (log.isLoggable(Level.INFO))log.log(Level.INFO, "Process Info="+m_pi+" AD_Client_ID="+Env.getAD_Client_ID(Env.getCtx()));
|
||||||
WProcessCtl.process(ProcessDialog.this, m_WindowNo, parameterPanel, m_pi, null);
|
WProcessCtl.process(ProcessDialog.this, m_WindowNo, parameterPanel, m_pi, null);
|
||||||
} finally {
|
} finally {
|
||||||
Executions.schedule(getDesktop(), ProcessDialog.this, new Event(ON_COMPLETE, ProcessDialog.this, null));
|
Executions.schedule(getDesktop(), ProcessDialog.this, new Event(ON_COMPLETE, ProcessDialog.this, null));
|
||||||
|
|
|
@ -505,7 +505,7 @@ public class ProcessModalDialog extends Window implements EventListener<Event>,
|
||||||
|
|
||||||
protected void doRun() {
|
protected void doRun() {
|
||||||
try {
|
try {
|
||||||
log.log(Level.INFO, "Process Info="+m_pi+" AD_Client_ID="+Env.getAD_Client_ID(Env.getCtx()));
|
if (log.isLoggable(Level.INFO))log.log(Level.INFO, "Process Info="+m_pi+" AD_Client_ID="+Env.getAD_Client_ID(Env.getCtx()));
|
||||||
WProcessCtl.process(ProcessModalDialog.this, m_WindowNo, parameterPanel, m_pi, null);
|
WProcessCtl.process(ProcessModalDialog.this, m_WindowNo, parameterPanel, m_pi, null);
|
||||||
} finally {
|
} finally {
|
||||||
Executions.schedule(getDesktop(), ProcessModalDialog.this, new Event(ON_COMPLETE, ProcessModalDialog.this, null));
|
Executions.schedule(getDesktop(), ProcessModalDialog.this, new Event(ON_COMPLETE, ProcessModalDialog.this, null));
|
||||||
|
|
|
@ -300,7 +300,7 @@ public class LoginPanel extends Window implements EventListener<Event>
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
//safe to ignore
|
//safe to ignore
|
||||||
logger.log(Level.INFO, e.getLocalizedMessage(), e);
|
if (logger.isLoggable(Level.INFO))logger.log(Level.INFO, e.getLocalizedMessage(), e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -131,7 +131,7 @@ public class OSTask extends Thread
|
||||||
}
|
}
|
||||||
catch (Exception ie)
|
catch (Exception ie)
|
||||||
{
|
{
|
||||||
log.log(Level.INFO, "(ie) - " + ie);
|
if (log.isLoggable(Level.INFO))log.log(Level.INFO, "(ie) - " + ie);
|
||||||
}
|
}
|
||||||
// ExitValue
|
// ExitValue
|
||||||
log.config("done");
|
log.config("done");
|
||||||
|
|
|
@ -138,11 +138,11 @@ public class WTask extends Window implements EventListener<Event>
|
||||||
Executions.deactivate(desktop);
|
Executions.deactivate(desktop);
|
||||||
}
|
}
|
||||||
} catch (DesktopUnavailableException e) {
|
} catch (DesktopUnavailableException e) {
|
||||||
log.log(Level.FINE, e.getLocalizedMessage(), e);
|
if (log.isLoggable(Level.FINE))log.log(Level.FINE, e.getLocalizedMessage(), e);
|
||||||
osTask.interrupt();
|
osTask.interrupt();
|
||||||
break;
|
break;
|
||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
log.log(Level.FINE, e.getLocalizedMessage(), e);
|
if (log.isLoggable(Level.FINE))log.log(Level.FINE, e.getLocalizedMessage(), e);
|
||||||
osTask.interrupt();
|
osTask.interrupt();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1285,7 +1285,7 @@ public class DB_Oracle implements AdempiereDatabase
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.log(Level.INFO, e.getLocalizedMessage(), e);
|
if (log.isLoggable(Level.INFO))log.log(Level.INFO, e.getLocalizedMessage(), e);
|
||||||
throw new DBException("Could not lock record for " + po.toString() + " caused by " + e.getLocalizedMessage());
|
throw new DBException("Could not lock record for " + po.toString() + " caused by " + e.getLocalizedMessage());
|
||||||
} finally {
|
} finally {
|
||||||
DB.close(rs, stmt);
|
DB.close(rs, stmt);
|
||||||
|
|
|
@ -350,7 +350,7 @@ public class DB_PostgreSQL implements AdempiereDatabase
|
||||||
if (!oraStatement.equals(retValue[0]) && retValue[0].indexOf("AD_Error") == -1)
|
if (!oraStatement.equals(retValue[0]) && retValue[0].indexOf("AD_Error") == -1)
|
||||||
{
|
{
|
||||||
//begin vpj-cd 24/06/2005 e-evolution
|
//begin vpj-cd 24/06/2005 e-evolution
|
||||||
log.log(Level.FINE, "PostgreSQL =>" + retValue[0] + "<= <" + oraStatement + ">");
|
if (log.isLoggable(Level.FINE))log.log(Level.FINE, "PostgreSQL =>" + retValue[0] + "<= <" + oraStatement + ">");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//end vpj-cd 24/06/2005 e-evolution
|
//end vpj-cd 24/06/2005 e-evolution
|
||||||
|
@ -1038,7 +1038,7 @@ public class DB_PostgreSQL implements AdempiereDatabase
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.log(Level.INFO, e.getLocalizedMessage(), e);
|
if (log.isLoggable(Level.INFO))log.log(Level.INFO, e.getLocalizedMessage(), e);
|
||||||
throw new DBException("Could not lock record for " + po.toString() + " caused by " + e.getLocalizedMessage());
|
throw new DBException("Could not lock record for " + po.toString() + " caused by " + e.getLocalizedMessage());
|
||||||
} finally {
|
} finally {
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -313,7 +313,7 @@ public class ModelADServiceImpl extends AbstractService implements ModelADServic
|
||||||
|
|
||||||
if (X_WS_WebService_Para.PARAMETERTYPE_Constant.equals(para.getParameterType())) {
|
if (X_WS_WebService_Para.PARAMETERTYPE_Constant.equals(para.getParameterType())) {
|
||||||
if (string == null || string.length() == 0) {
|
if (string == null || string.length() == 0) {
|
||||||
log.log(Level.INFO, "Web service type "
|
if (log.isLoggable(Level.INFO))log.log(Level.INFO, "Web service type "
|
||||||
+ m_webservicetype.getValue() + ": constant parameter "
|
+ m_webservicetype.getValue() + ": constant parameter "
|
||||||
+ parameterName + " set to "
|
+ parameterName + " set to "
|
||||||
+ para.getConstantValue());
|
+ para.getConstantValue());
|
||||||
|
|
Loading…
Reference in New Issue