fixed bug 35493: missing log info when check consistency fails
authorAsier Lostalé <asier.lostale@openbravo.com>
Mon, 13 Mar 2017 14:08:29 +0100
changeset 929 2c18bf970368
parent 928 8c2f9c7b3ec8
child 930 2686a1fd45b9
fixed bug 35493: missing log info when check consistency fails

Using now standard ConsoleAppender for logging instead of OBLogAppender which
does not handle properly logging in multi-thread.
src/org/openbravo/ddlutils/task/BaseDalInitializingTask.java
--- a/src/org/openbravo/ddlutils/task/BaseDalInitializingTask.java	Mon Mar 13 09:26:00 2017 +0100
+++ b/src/org/openbravo/ddlutils/task/BaseDalInitializingTask.java	Mon Mar 13 14:08:29 2017 +0100
@@ -11,7 +11,7 @@
  * under the License. 
  * The Original Code is Openbravo ERP. 
  * The Initial Developer of the Original Code is Openbravo SLU 
- * All portions are Copyright (C) 2009 Openbravo SLU 
+ * All portions are Copyright (C) 2009-2017 Openbravo SLU 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -51,17 +51,14 @@
   /**
    * Initializes the logging.
    */
-  @SuppressWarnings("deprecation")
   protected void initLogging() {
     final Properties props = new Properties();
     final String level = (verbosity == null ? Level.INFO.toString() : verbosity.getValue())
         .toUpperCase();
     props.setProperty("log4j.rootCategory", level + ",A");
-    props.setProperty("log4j.appender.A", "org.openbravo.utils.OBLogAppender");
-    org.openbravo.utils.OBLogAppender.setProject(getProject());
-    // "org.apache.log4j.ConsoleAppender");
+    props.setProperty("log4j.appender.A", "org.apache.log4j.ConsoleAppender");
     props.setProperty("log4j.appender.A.layout", "org.apache.log4j.PatternLayout");
-    props.setProperty("log4j.appender.A.layout.ConversionPattern", "%m%n");
+    props.setProperty("log4j.appender.A.layout.ConversionPattern", "%-5r %-4p - %m%n");
     // we don't want debug logging from Digester/Betwixt
     props.setProperty("log4j.logger.org.apache.commons", "WARN");
     props.setProperty("log4j.logger.org.hibernate", "WARN");