[aprm-windows]Change log4j to use slf4j.
authorGorka Ion Damián <gorkaion.damian@openbravo.com>
Thu, 19 Jun 2014 10:45:54 +0200
changeset 23841 f6cffed3670c
parent 23840 6cb454446dc2
child 23842 549e1a946f77
[aprm-windows]Change log4j to use slf4j.
modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/utility/FIN_Utility.java
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/utility/FIN_Utility.java	Thu Jun 19 10:31:55 2014 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/utility/FIN_Utility.java	Thu Jun 19 10:45:54 2014 +0200
@@ -37,7 +37,6 @@
 
 import org.apache.commons.lang.StringUtils;
 import org.apache.commons.lang.time.DateUtils;
-import org.apache.log4j.Logger;
 import org.hibernate.LockMode;
 import org.hibernate.Query;
 import org.hibernate.Session;
@@ -82,10 +81,11 @@
 import org.openbravo.model.financialmgmt.payment.FinAccPaymentMethod;
 import org.openbravo.service.db.CallStoredProcedure;
 import org.openbravo.utils.Replace;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class FIN_Utility {
-  private static final long serialVersionUID = 1L;
-  static Logger log4j = Logger.getLogger(Utility.class);
+  private static final Logger log4j = LoggerFactory.getLogger(FIN_Utility.class);
   private static AdvPaymentMngtDao dao;
 
   /**
@@ -916,7 +916,7 @@
         }
       }
     } catch (Exception e) {
-      log4j.error(e);
+      log4j.error("Error getting conversion rate", e);
       return null;
     } finally {
       OBContext.restorePreviousMode();
@@ -976,7 +976,7 @@
         return 0;
       }
     } catch (Exception e) {
-      log4j.error(e);
+      log4j.error("Error getting conversion rate precission", e);
       return 6; // by default precision of 6 decimals as is defaulted in Format.xml
     }
   }
@@ -1120,7 +1120,7 @@
       }
       return listPaymentConfirmedOrNot;
     } catch (Exception e) {
-      log4j.error(e);
+      log4j.error("Error getting list of confirmed payments", e);
       return null;
     } finally {
       OBContext.restorePreviousMode();