IDEMPIERE-2664 DB Extensibility issues / add VM property org.idempiere.db.postgresql.debug to help debugging convert and performance

This commit is contained in:
Carlos Ruiz 2015-08-17 15:33:08 -05:00
parent ccc10c104d
commit 8228607b35
2 changed files with 9 additions and 2 deletions

View File

@ -333,6 +333,10 @@ public class DB_PostgreSQL implements AdempiereDatabase
String cache = convertCache.get(oraStatement);
if (cache != null) {
Convert.logMigrationScript(oraStatement, cache);
if ("true".equals(System.getProperty("org.idempiere.db.postgresql.debug"))) {
// log.warning("Oracle -> " + oraStatement);
log.warning("Pgsql -> " + cache);
}
return cache;
}

View File

@ -47,7 +47,6 @@ public class Convert_PostgreSQL extends Convert_SQL92 {
private TreeMap<String,String> m_map;
/** Logger */
@SuppressWarnings("unused")
private static CLogger log = CLogger.getCLogger(Convert_PostgreSQL.class);
@ -115,7 +114,11 @@ public class Convert_PostgreSQL extends Convert_SQL92 {
if (retVars.size() > 0)
statement = recoverQuotedStrings(statement, retVars);
result.add(statement);
if ("true".equals(System.getProperty("org.idempiere.db.postgresql.debug"))) {
log.warning("Oracle -> " + sqlStatement);
log.warning("PgSQL -> " + statement);
}
return result;
} // convertStatement