X-Git-Url: https://git.ktnx.net/?a=blobdiff_plain;f=app%2Fsrc%2Fmain%2Fjava%2Fnet%2Fktnx%2Fmobileledger%2Fasync%2FRetrieveTransactionsTask.java;h=0b751b4c6d7df0c94174973ec7a2e449352c9dc9;hb=HEAD;hp=8add70b298080bb8fc7dc9338b5c031a03dae0f3;hpb=2692a4d29cf595d6b171e018768d891d8481bf92;p=mobile-ledger.git diff --git a/app/src/main/java/net/ktnx/mobileledger/async/RetrieveTransactionsTask.java b/app/src/main/java/net/ktnx/mobileledger/async/RetrieveTransactionsTask.java index 8add70b2..0b751b4c 100644 --- a/app/src/main/java/net/ktnx/mobileledger/async/RetrieveTransactionsTask.java +++ b/app/src/main/java/net/ktnx/mobileledger/async/RetrieveTransactionsTask.java @@ -439,6 +439,10 @@ public class RetrieveTransactionsTask extends Thread { list.add(acc); } throwIfCancelled(); + + Logger.warn("accounts", + String.format(Locale.US, "Got %d accounts using protocol %s", list.size(), + version.getDescription())); } return list; @@ -466,9 +470,9 @@ public class RetrieveTransactionsTask extends Thread { return retrieveTransactionListForVersion(ver); } catch (Exception e) { - Logger.debug("json", - String.format(Locale.US, "Error during account list retrieval using API %s", - ver.getDescription())); + Logger.debug("json", String.format(Locale.US, + "Error during transaction list retrieval using API %s", + ver.getDescription()), e); } } @@ -522,9 +526,13 @@ public class RetrieveTransactionsTask extends Thread { } throwIfCancelled(); + + Logger.warn("transactions", + String.format(Locale.US, "Got %d transactions using protocol %s", trList.size(), + apiVersion.getDescription())); } - // json interface returns transactions if file order and the rest of the machinery + // json interface returns transactions in file order and the rest of the machinery // expects them in reverse chronological order Collections.sort(trList, (o1, o2) -> { int res = o2.getDate() @@ -587,8 +595,8 @@ public class RetrieveTransactionsTask extends Thread { finish(new Result("Network error")); } catch (OperationCanceledException e) { - e.printStackTrace(); - finish(new Result("Operation cancelled")); + Logger.debug("RTT", "Retrieval was cancelled", e); + finish(new Result(null)); } catch (ApiNotSupportedException e) { e.printStackTrace();