killbill-memoizeit

payment: fix error logging * Make PaymentProcessor log errors

8/27/2012 1:40:28 PM

Details

diff --git a/payment/src/main/java/com/ning/billing/payment/bus/InvoiceHandler.java b/payment/src/main/java/com/ning/billing/payment/bus/InvoiceHandler.java
index a690ea7..8cae63a 100644
--- a/payment/src/main/java/com/ning/billing/payment/bus/InvoiceHandler.java
+++ b/payment/src/main/java/com/ning/billing/payment/bus/InvoiceHandler.java
@@ -75,7 +75,7 @@ public class InvoiceHandler {
             log.error("Failed to process invoice payment", e);
         } catch (PaymentApiException e) {
             if (e.getCode() != ErrorCode.PAYMENT_NULL_INVOICE.getCode()) {
-                log.error("Failed to process invoice payment", e);
+                log.error("Failed to process invoice payment {}", e.toString());
             }
         }
     }
diff --git a/payment/src/main/java/com/ning/billing/payment/core/PaymentProcessor.java b/payment/src/main/java/com/ning/billing/payment/core/PaymentProcessor.java
index 9b60708..ee41b6d 100644
--- a/payment/src/main/java/com/ning/billing/payment/core/PaymentProcessor.java
+++ b/payment/src/main/java/com/ning/billing/payment/core/PaymentProcessor.java
@@ -454,8 +454,8 @@ public class PaymentProcessor extends ProcessorBase {
 
                 paymentDao.updateStatusForPaymentWithAttempt(paymentInput.getId(), paymentStatus, paymentPluginInfo.getGatewayErrorCode(),  paymentPluginInfo.getGatewayError(),null, null, attemptInput.getId(), context);
 
-                log.info(String.format("Could not process payment for account %s, invoice %s, error = %s",
-                        account.getId(), invoice.getId(), paymentPluginInfo.getGatewayError()));
+                log.warn(String.format("Could not process payment for account %s, invoice %s, error = %s",
+                         account.getId(), invoice.getId(), paymentPluginInfo.getGatewayError()));
 
                 event = new DefaultPaymentErrorEvent(account.getId(), invoice.getId(), paymentInput.getId(), paymentPluginInfo.getGatewayError(), context.getUserToken());
                 throw new PaymentApiException(ErrorCode.PAYMENT_CREATE_PAYMENT, account.getId(), paymentPluginInfo.getGatewayError());