[hb] Fixes error log to the user. Used the last line in the process execution log
authorIván Perdomo <ivan.perdomo@openbravo.com>
Mon, 21 Sep 2009 13:19:43 +0200
changeset 5061 47af2fa0cb9f
parent 5060 d5cdcf4e2073
child 5062 69e4e32e3412
[hb] Fixes error log to the user. Used the last line in the process execution log
src/org/openbravo/erpCommon/ad_process/TestHeartbeat.java
--- a/src/org/openbravo/erpCommon/ad_process/TestHeartbeat.java	Mon Sep 21 12:34:02 2009 +0200
+++ b/src/org/openbravo/erpCommon/ad_process/TestHeartbeat.java	Mon Sep 21 13:19:43 2009 +0200
@@ -139,7 +139,11 @@
           OBDal.getInstance().commitAndClose();
 
           String msg = Utility.messageBD(this, "HB_INTERNAL_ERROR", vars.getLanguage());
-          msg += "\n" + result.getLog();
+          // Extracting the last line from the log
+          String log = result.getLog().substring(0, result.getLog().lastIndexOf("\n"));
+          log = log.substring(log.lastIndexOf("\n"));
+
+          msg += "\n" + log;
           msg = Utility.formatMessageBDToHtml(msg);
 
           if (vars.commandIn("CONFIGURE", "CONFIGURE_MODULE")) {