diff --git a/migration/iD11/oracle/202409231820_IDEMPIERE-6248.sql b/migration/iD11/oracle/202409231820_IDEMPIERE-6248.sql new file mode 100644 index 0000000000..5872cf9c4b --- /dev/null +++ b/migration/iD11/oracle/202409231820_IDEMPIERE-6248.sql @@ -0,0 +1,10 @@ +-- IDEMPIERE-6248 +SELECT register_migration_script('202409231820_IDEMPIERE-6248.sql') FROM dual; + +SET SQLBLANKLINES ON +SET DEFINE OFF + +-- Sep 23, 2024, 6:20:30 PM CEST +INSERT INTO AD_SysConfig (AD_SysConfig_ID,AD_Client_ID,AD_Org_ID,Created,Updated,CreatedBy,UpdatedBy,IsActive,Name,Value,Description,EntityType,ConfigurationLevel,AD_SysConfig_UU) VALUES (200250,0,0,TO_TIMESTAMP('2024-09-23 18:20:29','YYYY-MM-DD HH24:MI:SS'),TO_TIMESTAMP('2024-09-23 18:20:29','YYYY-MM-DD HH24:MI:SS'),10,10,'Y','FULL_EXCEPTION_TRACE_IN_LOG','N','If set to Y, the stack trace is not cut in the log (see https://idempiere.atlassian.net/browse/IDEMPIERE-6248)','D','S','8308ac18-d0a6-479f-ab59-7edd0bcb0b54') +; + diff --git a/migration/iD11/postgresql/202409231820_IDEMPIERE-6248.sql b/migration/iD11/postgresql/202409231820_IDEMPIERE-6248.sql new file mode 100644 index 0000000000..0f4f5dc2ba --- /dev/null +++ b/migration/iD11/postgresql/202409231820_IDEMPIERE-6248.sql @@ -0,0 +1,7 @@ +-- IDEMPIERE-6248 +SELECT register_migration_script('202409231820_IDEMPIERE-6248.sql') FROM dual; + +-- Sep 23, 2024, 6:20:30 PM CEST +INSERT INTO AD_SysConfig (AD_SysConfig_ID,AD_Client_ID,AD_Org_ID,Created,Updated,CreatedBy,UpdatedBy,IsActive,Name,Value,Description,EntityType,ConfigurationLevel,AD_SysConfig_UU) VALUES (200250,0,0,TO_TIMESTAMP('2024-09-23 18:20:29','YYYY-MM-DD HH24:MI:SS'),TO_TIMESTAMP('2024-09-23 18:20:29','YYYY-MM-DD HH24:MI:SS'),10,10,'Y','FULL_EXCEPTION_TRACE_IN_LOG','N','If set to Y, the stack trace is not cut in the log (see https://idempiere.atlassian.net/browse/IDEMPIERE-6248)','D','S','8308ac18-d0a6-479f-ab59-7edd0bcb0b54') +; + diff --git a/org.adempiere.base/src/org/compiere/model/MSysConfig.java b/org.adempiere.base/src/org/compiere/model/MSysConfig.java index 82429f272e..63311775d7 100644 --- a/org.adempiere.base/src/org/compiere/model/MSysConfig.java +++ b/org.adempiere.base/src/org/compiere/model/MSysConfig.java @@ -119,6 +119,7 @@ public class MSysConfig extends X_AD_SysConfig public static final String FORM_SQL_QUERY_LOG_ISSUE = "FORM_SQL_QUERY_LOG_ISSUE"; public static final String FORM_SQL_QUERY_MAX_RECORDS = "FORM_SQL_QUERY_MAX_RECORDS"; public static final String FORM_SQL_QUERY_TIMEOUT_IN_SECONDS = "FORM_SQL_QUERY_TIMEOUT_IN_SECONDS"; + public static final String FULL_EXCEPTION_TRACE_IN_LOG = "FULL_EXCEPTION_TRACE_IN_LOG"; public static final String GLOBAL_MAX_QUERY_RECORDS = "GLOBAL_MAX_QUERY_RECORDS"; public static final String GLOBAL_MAX_REPORT_RECORDS = "GLOBAL_MAX_REPORT_RECORDS"; public static final String GRIDTABLE_LOAD_TIMEOUT_IN_SECONDS = "GRIDTABLE_LOAD_TIMEOUT_IN_SECONDS"; diff --git a/org.adempiere.base/src/org/compiere/util/CLogFormatter.java b/org.adempiere.base/src/org/compiere/util/CLogFormatter.java index b9a02aa0f0..929cfa8950 100644 --- a/org.adempiere.base/src/org/compiere/util/CLogFormatter.java +++ b/org.adempiere.base/src/org/compiere/util/CLogFormatter.java @@ -16,6 +16,8 @@ *****************************************************************************/ package org.compiere.util; +import static org.compiere.model.MSysConfig.FULL_EXCEPTION_TRACE_IN_LOG; + import java.awt.Toolkit; import java.rmi.ServerException; import java.sql.SQLException; @@ -25,6 +27,7 @@ import java.util.logging.Handler; import java.util.logging.Level; import java.util.logging.LogRecord; +import org.compiere.model.MSysConfig; import org.compiere.model.SystemProperties; /** @@ -307,8 +310,7 @@ public class CLogFormatter extends Formatter if (adempiereTrace) sb.append("\tat ").append(trace[i]).append(NL); } - else if (i > 20 - || (i > 10 && adempiereTraceNo > 8)) + else if (!MSysConfig.getBooleanValue(FULL_EXCEPTION_TRACE_IN_LOG, false) && (i > 20 || (i > 10 && adempiereTraceNo > 8))) break; else sb.append("\tat ").append(trace[i]).append(NL);