IDEMPIERE-6128 make org.idempiere.db.debug show just native Postgresql by default (#2335)
This commit is contained in:
parent
44688e37a1
commit
f82c6a9468
|
|
@ -47,6 +47,7 @@ public class SystemProperties {
|
||||||
private static final String org_adempiere_po_useTimeoutForUpdate = "org.adempiere.po.useTimeoutForUpdate";
|
private static final String org_adempiere_po_useTimeoutForUpdate = "org.adempiere.po.useTimeoutForUpdate";
|
||||||
private static final String org_compiere_report_path = "org.compiere.report.path";
|
private static final String org_compiere_report_path = "org.compiere.report.path";
|
||||||
private static final String org_idempiere_db_debug = "org.idempiere.db.debug";
|
private static final String org_idempiere_db_debug = "org.idempiere.db.debug";
|
||||||
|
private static final String org_idempiere_db_debug_convert = "org.idempiere.db.debug.convert";
|
||||||
private static final String org_idempiere_db_debug_filter = "org.idempiere.db.debug.filter";
|
private static final String org_idempiere_db_debug_filter = "org.idempiere.db.debug.filter";
|
||||||
private static final String org_idempiere_FileLogPrefix = "org.idempiere.FileLogPrefix";
|
private static final String org_idempiere_FileLogPrefix = "org.idempiere.FileLogPrefix";
|
||||||
private static final String org_idempiere_postgresql_URLParameters = "org.idempiere.postgresql.URLParameters";
|
private static final String org_idempiere_postgresql_URLParameters = "org.idempiere.postgresql.URLParameters";
|
||||||
|
|
@ -178,6 +179,14 @@ public class SystemProperties {
|
||||||
return System.getProperty(org_idempiere_db_debug_filter);
|
return System.getProperty(org_idempiere_db_debug_filter);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* org.idempiere.db.convert=true to print also Oracle SQL Statements being converted
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public static boolean isDBDebugConvert() {
|
||||||
|
return "true".equals(System.getProperty(org_idempiere_db_debug_convert));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* org.idempiere.FileLogPrefix defines the template prefix to write logs
|
* org.idempiere.FileLogPrefix defines the template prefix to write logs
|
||||||
* @return
|
* @return
|
||||||
|
|
|
||||||
|
|
@ -148,8 +148,8 @@ public class Convert_PostgreSQL extends Convert_SQL92 {
|
||||||
boolean print = true;
|
boolean print = true;
|
||||||
if (filterPgDebug != null)
|
if (filterPgDebug != null)
|
||||||
print = statement.matches(filterPgDebug);
|
print = statement.matches(filterPgDebug);
|
||||||
// log.warning("Oracle -> " + oraStatement);
|
|
||||||
if (print) {
|
if (print) {
|
||||||
|
if (SystemProperties.isDBDebugConvert())
|
||||||
log.warning("Oracle -> " + sqlStatement);
|
log.warning("Oracle -> " + sqlStatement);
|
||||||
log.warning("PgSQL -> " + statement);
|
log.warning("PgSQL -> " + statement);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue