Standardized on logging using TAG = CurrentClass.class.getName() rather than ad hoc...
authorkenstir <kenstir@gmail.com>
Sat, 14 Dec 2013 21:56:54 +0000 (16:56 -0500)
committerkenstir <kenstir@gmail.com>
Sat, 14 Dec 2013 21:56:54 +0000 (16:56 -0500)
26 files changed:
Open-ILS/src/Android/core/src/org/evergreen/android/accountAccess/AccountAccess.java
Open-ILS/src/Android/core/src/org/evergreen/android/accountAccess/bookbags/BookBagDetails.java
Open-ILS/src/Android/core/src/org/evergreen/android/accountAccess/bookbags/BookbagsListView.java
Open-ILS/src/Android/core/src/org/evergreen/android/accountAccess/checkout/CircRecord.java
Open-ILS/src/Android/core/src/org/evergreen/android/accountAccess/checkout/ItemsCheckOutListView.java
Open-ILS/src/Android/core/src/org/evergreen/android/accountAccess/holds/HoldDetails.java
Open-ILS/src/Android/core/src/org/evergreen/android/accountAccess/holds/HoldsListView.java
Open-ILS/src/Android/core/src/org/evergreen/android/accountAccess/holds/PlaceHold.java
Open-ILS/src/Android/core/src/org/evergreen/android/globals/GlobalConfigs.java
Open-ILS/src/Android/core/src/org/evergreen/android/globals/Utils.java
Open-ILS/src/Android/core/src/org/evergreen/android/searchCatalog/AdvancedSearchActivity.java
Open-ILS/src/Android/core/src/org/evergreen/android/searchCatalog/CopyCountInformation.java
Open-ILS/src/Android/core/src/org/evergreen/android/searchCatalog/CopyInformation.java
Open-ILS/src/Android/core/src/org/evergreen/android/searchCatalog/RecordInfo.java
Open-ILS/src/Android/core/src/org/evergreen/android/searchCatalog/SearchCatalog.java
Open-ILS/src/Android/core/src/org/evergreen/android/searchCatalog/SearchCatalogListView.java
Open-ILS/src/Android/core/src/org/evergreen/android/services/NotificationReceiver.java
Open-ILS/src/Android/core/src/org/evergreen/android/services/ScheduledIntentService.java
Open-ILS/src/Android/core/src/org/evergreen/android/utils/ui/BasicDetailsFragment.java
Open-ILS/src/Android/core/src/org/evergreen/android/views/ApplicationPreferences.java
Open-ILS/src/Android/core/src/org/evergreen/android/views/splashscreen/LoadingTask.java
Open-ILS/src/Android/core/src/org/evergreen_ils/auth/AccountAuthenticator.java
Open-ILS/src/Android/core/src/org/evergreen_ils/auth/AuthenticatorActivity.java
Open-ILS/src/Android/core/src/org/evergreen_ils/auth/EvergreenAuthenticator.java
Open-ILS/src/Android/core/src/org/open_ils/idl/IDLParser.java
Open-ILS/src/Android/core/src/org/open_ils/test/TestIDL.java

index 7412fdc..7d48cb5 100644 (file)
@@ -32,6 +32,7 @@ import android.app.Activity;
 import android.os.Bundle;
 import android.os.Looper;
 import android.text.TextUtils;
+import android.util.Log;
 import org.evergreen.android.R;
 import org.evergreen.android.accountAccess.bookbags.BookBag;
 import org.evergreen.android.accountAccess.bookbags.BookBagItem;
@@ -162,7 +163,7 @@ public class AccountAccess {
     private String httpAddress = "http://ulysses.calvin.edu";
 
     /** The TAG. */
-    private String TAG = "AccountAccess";
+    private final String TAG = AccountAccess.class.getName();
 
     /**
      * The auth token. Sent with every request that needs authentication
@@ -198,18 +199,16 @@ public class AccountAccess {
      */
     private AccountAccess(String httpAddress) {
 
-        System.out.println("AccountAccess ctor: "+httpAddress);
+        Log.d(TAG, "AccountAccess ctor: " + httpAddress);
         this.httpAddress = httpAddress;
 
         try {
             // configure the connection
-
-            System.out.println("Connection with " + httpAddress);
+            Log.d(TAG, "Connection with " + httpAddress);
             conn = new HttpConnection(httpAddress + "/osrf-gateway-v1");
 
         } catch (Exception e) {
-            System.err.println("Exception in establishing connection "
-                    + e.getMessage());
+            Log.d(TAG, "Exception in establishing connection", e);
         }
 
     }
@@ -238,8 +237,6 @@ public class AccountAccess {
         if (accountAccess == null) {
             accountAccess = new AccountAccess(httpAddress);
         }
-        System.out.println(" Addresses " + httpAddress + " "
-                + accountAccess.httpAddress);
         if (!httpAddress.equals(accountAccess.httpAddress))
             accountAccess.updateHttpAddress(httpAddress);
 
@@ -273,12 +270,12 @@ public class AccountAccess {
      * @param httpAddress the http address
      */
     public void updateHttpAddress(String httpAddress) {
-        System.out.println("update http address of account access to "
+        Log.d(TAG, "update http address of account access to "
                 + httpAddress);
         try {
             // configure the connection
             this.httpAddress = httpAddress;
-            System.out.println("Connection with " + httpAddress);
+            Log.d(TAG, "Connection with " + httpAddress);
             conn = new HttpConnection(httpAddress + "/osrf-gateway-v1");
 
         } catch (Exception e) {
@@ -425,7 +422,7 @@ public class AccountAccess {
                         circRecord);
                 circRecords.add(circRecord);
 
-                // System.out.println(out.get(i).get("target_copy"));
+                // Log.d(TAG, out.get(i).get("target_copy"));
                 // fetchInfoForCheckedOutItem(out.get(i).get("target_copy")+"");
             }
 
@@ -443,12 +440,12 @@ public class AccountAccess {
             }
         // TODO are we using this too? In the opac they are not used
         /*
-         * for(int i=0;i<lost_id.size();i++){ //System.out.println(out.get(i));
+         * for(int i=0;i<lost_id.size();i++){ //Log.d(TAG, out.get(i));
          * lost.add(retrieveCircRecord(lost_id.get(i))); } for(int
-         * i=0;i<claims_returned.size();i++){ //System.out.println(out.get(i));
+         * i=0;i<claims_returned.size();i++){ //Log.d(TAG, out.get(i));
          * claims_returned.add(retrieveCircRecord(claims_returned_id.get(i))); }
          * for(int i=0;i<long_overdue_id.size();i++){
-         * //System.out.println(out.get(i));
+         * //Log.d(TAG, out.get(i));
          * long_overdue.add(retrieveCircRecord(long_overdue_id.get(i))); }
          */
 
@@ -498,7 +495,7 @@ public class AccountAccess {
             return null;
 
         OSRFObject result;
-        System.out.println("Mods from copy");
+        Log.d(TAG, "Mods from copy");
         OSRFObject info_mvr = fetchModsFromCopy(target_copy);
         // if title or author not inserted, request acp with copy_target
         result = info_mvr;
@@ -507,7 +504,7 @@ public class AccountAccess {
         // the logic to establish mvr or acp is copied from the opac
         if (info_mvr.getString("title") == null
                 || info_mvr.getString("author") == null) {
-            System.out.println("Asset");
+            Log.d(TAG, "Asset");
             info_acp = fetchAssetCopy(target_copy);
             result = info_acp;
             circRecord.acp = info_acp;
@@ -619,7 +616,7 @@ public class AccountAccess {
         Object resp = Utils.doRequest(conn, SERVICE_CIRC, METHOD_FETCH_HOLDS,
                 authToken, new Object[] { authToken, userID });
         if (resp == null) {
-            System.out.println("Result: null");
+            Log.d(TAG, "Result: null");
             return holds;
         }
 
@@ -665,11 +662,10 @@ public class AccountAccess {
                 method = METHOD_FETCH_MRMODS;
             if (holdType.equals("T"))
                 method = METHOD_FETCH_RMODS;
-            System.out.println();
             holdInfo = (OSRFObject) Utils.doRequest(conn, SERVICE_SEARCH,
                     method, cm, new Object[] { holdArhObject.get("target") });
 
-            // System.out.println("Hold here " + holdInfo);
+            // Log.d(TAG, "Hold here " + holdInfo);
             hold.title = ((OSRFObject) holdInfo).getString("title");
             hold.author = ((OSRFObject) holdInfo).getString("author");
             hold.recordInfo = new RecordInfo((OSRFObject) holdInfo);
@@ -700,7 +696,7 @@ public class AccountAccess {
 
         String type = (String) hold.get("hold_type");
 
-        System.out.println("Hold Type " + type);
+        Log.d(TAG, "Hold Type " + type);
         if (type.equals("C")) {
 
             /*
@@ -724,7 +720,7 @@ public class AccountAccess {
                 // part label
                 holdObj.part_label = volume.getString("label");
 
-                System.out.println("Record " + record);
+                Log.d(TAG, "Record " + record);
                 OSRFObject holdInfo = (OSRFObject) Utils.doRequest(conn,
                         SERVICE_SEARCH, METHOD_FETCH_RMODS, cm,
                         new Object[] { record });
@@ -757,7 +753,7 @@ public class AccountAccess {
             // part label
             holdObj.part_label = volume.getString("label");
 
-            System.out.println("Record " + record);
+            Log.d(TAG, "Record " + record);
             OSRFObject holdInfo = (OSRFObject) Utils.doRequest(conn,
                     SERVICE_SEARCH, METHOD_FETCH_RMODS, cm,
                     new Object[] { record });
@@ -963,7 +959,7 @@ public class AccountAccess {
             resp[2] = ((Map<String, String>) map).get("desc");
         }
 
-        System.out.println("Result " + resp[1] + " " + resp[2]);
+        Log.d(TAG, "Result " + resp[1] + " " + resp[2]);
 
         // else we return false
         return resp;
@@ -1024,7 +1020,7 @@ public class AccountAccess {
                 new Object[] { param });
 
         Object obj = response.get("metarecord");
-        System.out.println(obj);
+        Log.d(TAG, "metarecord="+obj);
         Integer metarecordID = Integer.parseInt(obj.toString());
 
         HashMap<String, Integer> map = new HashMap<String, Integer>();
index c6b96d1..18ff9aa 100644 (file)
@@ -56,7 +56,7 @@ import android.widget.Toast;
 
 public class BookBagDetails extends Activity {
 
-    private String TAG = "BookBags";
+    private final String TAG = BookBagDetails.class.getName();
 
     public static final int RESULT_CODE_UPDATE = 1;
 
index 67d210c..18d71ee 100644 (file)
@@ -52,7 +52,7 @@ import android.widget.Toast;
 
 public class BookbagsListView extends Activity {
 
-    private String TAG = "BookBags";
+    private final String TAG = BookbagsListView.class.getName();
 
     private AccountAccess accountAccess = null;
 
@@ -158,7 +158,7 @@ public class BookbagsListView extends Activity {
                                 if (accountAccess.reauthenticate(BookbagsListView.this))
                                     accountAccess.createBookbag(name);
                             } catch (Exception eauth) {
-                                System.out.println("Exception in reAuth");
+                                Log.d(TAG, "Exception in reAuth");
                             }
                         }
 
@@ -205,7 +205,7 @@ public class BookbagsListView extends Activity {
                         if (accountAccess.reauthenticate(BookbagsListView.this))
                             accountAccess.retrieveBookbags();
                     } catch (Exception eauth) {
-                        System.out.println("Exception in reAuth");
+                        Log.d(TAG, "Exception in reAuth");
                     }
                 }
                 bookBags = accountAccess.getBookbags();
index e37db58..2e95972 100644 (file)
@@ -76,16 +76,14 @@ public class CircRecord {
 
         this.circ_type = circ_type;
         this.circ_id = circ_id;
-        // parse due date
-        parseDate(circ);
+        this.circ_due_date = GlobalConfigs.parseDate(circ.getString("due_date"));
     }
 
     public CircRecord(OSRFObject circ, int circ_type, int circ_id) {
         this.circ = circ;
         this.circ_type = circ_type;
         this.circ_id = circ_id;
-        // parse due date
-        parseDate(circ);
+        this.circ_due_date = GlobalConfigs.parseDate(circ.getString("due_date"));
     }
 
     public String getAuthor() {
@@ -136,12 +134,4 @@ public class CircRecord {
         return null;
     }
 
-    private void parseDate(OSRFObject circ) {
-
-        this.circ_due_date = GlobalConfigs
-                .parseDate(circ.getString("due_date"));
-        System.out.println(this.circ_due_date);
-
-    }
-
 }
index 03fffba..fb438a1 100644 (file)
@@ -54,7 +54,7 @@ import android.widget.Toast;
 
 public class ItemsCheckOutListView extends Activity {
 
-    private String TAG = ItemsCheckOutListView.class.getName();
+    private final String TAG = ItemsCheckOutListView.class.getName();
 
     private AccountAccess accountAccess = null;
 
index 6457b1d..2d822af 100644 (file)
@@ -23,6 +23,7 @@ import java.util.ArrayList;
 import java.util.Calendar;
 import java.util.Date;
 
+import android.util.Log;
 import org.evergreen.android.R;
 import org.evergreen.android.accountAccess.AccountAccess;
 import org.evergreen.android.accountAccess.SessionNotFoundException;
@@ -60,6 +61,8 @@ import android.widget.Toast;
 
 public class HoldDetails extends Activity {
 
+    private final String TAG = HoldDetails.class.getName();
+
     public static final int RESULT_CODE_DELETE_HOLD = 5;
 
     public static final int RESULT_CODE_UPDATE_HOLD = 6;
@@ -152,7 +155,7 @@ public class HoldDetails extends Activity {
         final HoldRecord record = (HoldRecord) getIntent()
                 .getSerializableExtra("holdRecord");
 
-        System.out.println("Record " + record + " " + record.title + " "
+        Log.d(TAG, "Record " + record + " " + record.title + " "
                 + record.ahr);
 
         accountAccess = AccountAccess.getAccountAccess();
@@ -194,7 +197,7 @@ public class HoldDetails extends Activity {
         if (record.thaw_date == null)
             disableView(thaw_date_edittext);
 
-        System.out.println(record.title + " " + record.author);
+        Log.d(TAG, record.title + " " + record.author);
 
         back.setOnClickListener(new OnClickListener() {
             @Override
@@ -222,7 +225,7 @@ public class HoldDetails extends Activity {
                             public void onClick(DialogInterface dialog,
                                     int which) {
 
-                                System.out.println("Remove hold with id"
+                                Log.d(TAG, "Remove hold with id"
                                         + record.ahr.getInt("id"));
 
                                 progressDialog = ProgressDialog.show(context,
@@ -242,8 +245,7 @@ public class HoldDetails extends Activity {
                                                             accountAccess
                                                                     .cancelHold(record.ahr);
                                                     } catch (Exception eauth) {
-                                                        System.out
-                                                                .println("Exception in reAuth");
+                                                        Log.d(TAG, "Exception in reAuth");
                                                     }
                                                 }
 
@@ -291,7 +293,7 @@ public class HoldDetails extends Activity {
                                     suspendHold.isChecked(), expire_date_s,
                                     thaw_date_s);
                     } catch (Exception eauth) {
-                        System.out.println("Exception in reAuth");
+                        Log.d(TAG, "Exception in reAuth");
                     }
                 }
 
index 198e4c9..bd38443 100644 (file)
@@ -53,7 +53,7 @@ import android.widget.Toast;
 
 public class HoldsListView extends Activity {
 
-    private String TAG = "HoldsListView";
+    private final String TAG = HoldsListView.class.getName();
 
     private AccountAccess accountAccess = null;
 
@@ -138,7 +138,7 @@ public class HoldsListView extends Activity {
                         if (accountAccess.reauthenticate(HoldsListView.this))
                             holdRecords = accountAccess.getHolds();
                     } catch (Exception eauth) {
-                        System.out.println("Exception in reauth");
+                        Log.d(TAG, "Exception in reauth");
                     }
                 }
 
index 7ffb7c6..4c2a071 100644 (file)
@@ -23,6 +23,7 @@ import java.util.ArrayList;
 import java.util.Calendar;
 import java.util.Date;
 
+import android.util.Log;
 import org.evergreen.android.R;
 import org.evergreen.android.accountAccess.AccountAccess;
 import org.evergreen.android.accountAccess.SessionNotFoundException;
@@ -58,6 +59,8 @@ import android.widget.Toast;
 
 public class PlaceHold extends Activity {
 
+    private final String TAG = PlaceHold.class.getName();
+
     private TextView recipient;
 
     private TextView title;
@@ -210,7 +213,7 @@ public class PlaceHold extends Activity {
                 if (thaw_date != null)
                     thaw_date_s = GlobalConfigs.getStringDate(thaw_date);
 
-                System.out.println("date expire: " + expire_date_s + " "
+                Log.d(TAG, "date expire: " + expire_date_s + " "
                         + expire_date);
                 int selectedOrgID = -1;
                 if (globalConfigs.organisations.size() > selectedOrgPos)
index 8c1b8c8..f05c02f 100644 (file)
@@ -259,7 +259,6 @@ public class GlobalConfigs {
 
         try {
             date = sdf.parse(dateString);
-            //System.out.println(date);
         } catch (ParseException e) {
             e.printStackTrace();
         }
@@ -275,7 +274,6 @@ public class GlobalConfigs {
     public String getOrganizationName(int id) {
 
         for (int i = 0; i < organisations.size(); i++) {
-            //System.out.println("Id " + organisations.get(i).id + " " + i);
             if (organisations.get(i).id == id)
                 return organisations.get(i).name;
         }
index c2fe416..30e454c 100644 (file)
@@ -69,7 +69,7 @@ public class Utils {
             HttpGet request = new HttpGet(url);
             response = client.execute(request);
         } catch (Exception e) {
-            System.out.println("Exception to GET page " + url);
+            Log.d(TAG, "Exception to GET page " + url);
         }
         StringBuilder str = null;
 
@@ -104,7 +104,7 @@ public class Utils {
             HttpGet request = new HttpGet(url);
             response = client.execute(request);
         } catch (Exception e) {
-            System.out.println("Exception to GET page " + url);
+            Log.d(TAG, "Exception to GET page " + url);
         }
 
         try {
@@ -251,10 +251,10 @@ public class Utils {
 
         Method method = new Method(methodName);
 
-        System.out.println("doRequest Method :" + methodName + ":");
+        Log.d(TAG, "doRequest Method :" + methodName + ":");
         for (int i = 0; i < params.length; i++) {
             method.addParam(params[i]);
-            System.out.println("Param " + i + ": " + params[i]);
+            Log.d(TAG, "Param " + i + ": " + params[i]);
         }
 
         // sync request
@@ -262,7 +262,7 @@ public class Utils {
         Object resp;
 
         while ((resp = req.recv()) != null) {
-            System.out.println("Sync Response: " + resp);
+            Log.d(TAG, "Sync Response: " + resp);
             Object response = (Object) resp;
 
             return response;
@@ -283,10 +283,10 @@ public class Utils {
         }
 
         Method method = new Method(methodName);
-        System.out.println("doRequestSimple Method :" + methodName);
+        Log.d(TAG, "doRequestSimple Method :" + methodName);
         for (int i = 0; i < params.length; i++) {
             method.addParam(params[i]);
-            System.out.println("Param " + i + ":" + params[i]);
+            Log.d(TAG, "Param " + i + ":" + params[i]);
         }
 
         // sync request
@@ -294,7 +294,7 @@ public class Utils {
         Object resp;
 
         while ((resp = req.recv()) != null) {
-            System.out.println("Sync Response: " + resp);
+            Log.d(TAG, "Sync Response: " + resp);
             Object response = (Object) resp;
 
             return response;
index 052ff36..e1a114d 100644 (file)
@@ -42,7 +42,7 @@ import android.widget.TextView;
 
 public class AdvancedSearchActivity extends Activity {
 
-    private String TAG = "AdvancedSearchActivity";
+    private final String TAG = AdvancedSearchActivity.class.getName();
 
     private AccountAccess accountAccess = null;
 
index 2f6aab7..d16fdde 100644 (file)
  */
 package org.evergreen.android.searchCatalog;
 
+import android.util.Log;
+
 import java.io.Serializable;
 import java.util.Map;
 
 public class CopyCountInformation implements Serializable {
 
-    /**
-        * 
-        */
+    private final String TAG = CopyCountInformation.class.getName();
     private static final long serialVersionUID = 12343248767867L;
     public Integer org_id;
     public Integer count;
@@ -42,7 +42,7 @@ public class CopyCountInformation implements Serializable {
         this.depth = ((Map<String, Integer>) map).get("depth");
         this.unshadow = ((Map<String, Integer>) map).get("unshadow");
 
-        System.out.println(org_id + " " + available + " " + count);
+        Log.d(TAG, org_id + " " + available + " " + count);
     }
 
 }
index cd50eb4..4c5d8d9 100644 (file)
@@ -19,6 +19,8 @@
  */
 package org.evergreen.android.searchCatalog;
 
+import android.util.Log;
+
 import java.io.Serializable;
 import java.util.HashMap;
 import java.util.Iterator;
@@ -29,11 +31,10 @@ import java.util.Set;
 
 public class CopyInformation implements Serializable {
 
-    /**
-        * 
-        */
     private static final long serialVersionUID = -7269334218707079463L;
 
+    private final String TAG = CopyInformation.class.getName();
+
     public Integer org_id = -1;
 
     public String call_number_sufix;
@@ -71,7 +72,7 @@ public class CopyInformation implements Serializable {
             if (hashValCopy.containsKey(entry.getKey())) {
                 statusInformation.put(entry.getValue(),
                         hashValCopy.get(entry.getKey()) + "");
-                System.out.println("Added " + entry.getKey() + " "
+                Log.d(TAG, "Added " + entry.getKey() + " "
                         + entry.getValue() + " "
                         + hashValCopy.get(entry.getKey()));
             }
index 489cf66..7889187 100644 (file)
@@ -25,17 +25,17 @@ import java.util.List;
 import java.util.Map;
 import java.util.Map.Entry;
 
+import android.util.Log;
 import org.opensrf.util.OSRFObject;
 
 public class RecordInfo implements Serializable {
 
     // {"title","author","doc_id","doc_type","pubdate","isbn","publisher","tcn","subject","type_of_resources","call_numbers","edition","online_loc","synopsis","physical_description","toc","copy_count","series","serials","foreign_copy_maps"});
 
-    /**
-        * 
-        */
     private static final long serialVersionUID = 10123L;
 
+    private final String TAG = RecordInfo.class.getName();
+
     public String title = null;
 
     public String author = null;
@@ -91,14 +91,14 @@ public class RecordInfo implements Serializable {
             this.image = info.getString("tcn");
             this.doc_type = info.getString("doc_type");
         } catch (Exception e) {
-            System.out.println("Exception basic info " + e.getMessage());
+            Log.d(TAG, "Exception basic info " + e.getMessage());
         }
         ;
 
         try {
             this.isbn = (String) info.get("isbn");
         } catch (Exception e) {
-            System.out.println("Exception isbn " + e.getMessage());
+            Log.d(TAG, "Exception isbn " + e.getMessage());
         }
         ;
 
@@ -119,7 +119,7 @@ public class RecordInfo implements Serializable {
             }
 
         } catch (Exception e) {
-            System.out.println("Exception subject " + e.getMessage());
+            Log.d(TAG, "Exception subject " + e.getMessage());
         }
         ;
         try {
@@ -127,14 +127,14 @@ public class RecordInfo implements Serializable {
             this.online_loc = ((List) info.get("online_loc")).get(0).toString();
 
         } catch (Exception e) {
-            System.out.println("Exception online_loc " + e.getMessage());
+            Log.d(TAG, "Exception online_loc " + e.getMessage());
         }
         ;
         try {
             this.physical_description = (String) info
                     .get("physical_description");
         } catch (Exception e) {
-            System.out.println("Exception physical_description "
+            Log.d(TAG, "Exception physical_description "
                     + e.getMessage());
         }
         ;
@@ -147,7 +147,7 @@ public class RecordInfo implements Serializable {
                 else
                     this.series += seriesList.get(i);
         } catch (Exception e) {
-            System.out.println("Exception series " + e.getMessage());
+            Log.d(TAG, "Exception series " + e.getMessage());
         }
         ;
 
index 25dc918..f8fd993 100644 (file)
@@ -191,7 +191,7 @@ public class SearchCatalog {
              */
 
         } catch (Exception e) {
-            System.out.println("Exception in JSON " + e.getMessage());
+            Log.d(TAG, "Exception in JSON " + e.getMessage());
         }
 
         // do request and check for connectivity
@@ -200,17 +200,17 @@ public class SearchCatalog {
 
         ArrayList<String> ids = new ArrayList<String>();
 
-        System.out.println("Sync Response: " + resp);
+        Log.d(TAG, "Sync Response: " + resp);
         if (resp == null)
             return resultsRecordInfo; // search failed or server crashed
 
         Map<String, ?> response = (Map<String, ?>) resp;
 
-        System.out.println(" ids : " + response.get("ids") + " ");
+        Log.d(TAG, " ids : " + response.get("ids") + " ");
 
         List<List<String>> result_ids;
         result_ids = (List<List<String>>) response.get("ids");
-        System.out.println("length:"+result_ids.size());
+        Log.d(TAG, "length:"+result_ids.size());
         
         // sometimes count is an int ("count":0) and sometimes string ("count":"1103")
         visible = Integer.parseInt(response.get("count").toString());
@@ -219,7 +219,7 @@ public class SearchCatalog {
             ids.add(result_ids.get(i).get(0));
         }
 
-        System.out.println("Ids " + ids);
+        Log.d(TAG, "Ids " + ids);
 
         // request other info based on ids
 
@@ -245,7 +245,7 @@ public class SearchCatalog {
                     record.copyInformationList.add(copyInfo);
                 }
 
-            System.out.println("Title " + record.title + " Author "
+            Log.d(TAG, "Title " + record.title + " Author "
                     + record.author + " Pub date" + record.pubdate
                     + " Publisher" + record.publisher);
         }
@@ -269,7 +269,7 @@ public class SearchCatalog {
         HttpRequest req = new GatewayRequest(conn, SERVICE, method).send();
         Object resp;
         while ((resp = req.recv()) != null) {
-            System.out.println("Sync Response: " + resp);
+            Log.d(TAG, "Sync Response: " + resp);
             return (OSRFObject) resp;
         }
 
@@ -327,7 +327,7 @@ public class SearchCatalog {
                     CopyInformation.availableOrgStatuses.put(
                             ccs_obj.getInt("id") + "",
                             ccs_obj.getString("name"));
-                    //System.out.println("Add status "+ccs_obj.getString("name"));
+                    //Log.d(TAG, "Add status "+ccs_obj.getString("name"));
                 }
             }
         }
index e7073b6..ad1bbb0 100644 (file)
@@ -72,7 +72,7 @@ import android.widget.Toast;
 
 public class SearchCatalogListView extends Activity {
 
-    private String TAG = "SearchCatalogListView";
+    private final String TAG = SearchCatalogListView.class.getName();
 
     private ArrayList<RecordInfo> recordList;
 
@@ -437,7 +437,7 @@ public class SearchCatalogListView extends Activity {
 
                                                 // don't clear record list
                                                 // recordList.clear();
-                                                System.out.println("Returned "
+                                                Log.d(TAG, "Returned "
                                                         + searchResults.size()
                                                         + " elements from search");
                                                 if (searchResults.size() > 0) {
@@ -508,7 +508,7 @@ public class SearchCatalogListView extends Activity {
             homeLibrary = AccountAccess.getAccountAccess().getHomeLibraryID();
         }
         ArrayList<String> list = new ArrayList<String>();
-        Log.d("kcxxx", "Org scanning ...");
+        Log.d(TAG, "Org scanning ...");
         if (globalConfigs.organisations != null) {
             for (int i = 0; i < globalConfigs.organisations.size(); i++) {
                 Organisation org = globalConfigs.organisations.get(i);
@@ -517,7 +517,7 @@ public class SearchCatalogListView extends Activity {
                     selectedPos = i;
             }
         }
-        Log.d("kcxxx", "Org scanning ...done");
+        Log.d(TAG, "Org scanning ...done");
         ArrayAdapter<String> adapter = new ArrayAdapter<String>(this,
                 layout.spinner_layout, list);
         choseOrganisation = (Spinner) findViewById(R.id.chose_organisation);
index fc3d567..c4ada30 100644 (file)
@@ -32,7 +32,7 @@ import android.util.Log;
 
 public class NotificationReceiver extends BroadcastReceiver {
 
-    private String TAG = "NotificationManager";
+    private final String TAG = NotificationReceiver.class.getName();
     public static final int NOTIFICATION_ID = 1;
 
     @Override
index cef1cee..1e63fa4 100644 (file)
@@ -138,7 +138,6 @@ public class ScheduledIntentService extends IntentService {
             List<NotificationAlert> alarms = daoNotifications.fetchAll("");
 
             for (int i = 0; i < alarms.size(); i++) {
-                System.out.println("notification " + alarms.get(i));
                 Log.d(TAG, "Notification " + alarms.get(i));
             }
             for (int i = 0; i < circRecords.size(); i++) {
index d73d517..fb4b171 100644 (file)
@@ -24,6 +24,7 @@ import java.util.Iterator;
 import java.util.Map.Entry;
 import java.util.Set;
 
+import android.util.Log;
 import org.evergreen.android.R;
 import org.evergreen.android.accountAccess.AccountAccess;
 import org.evergreen.android.accountAccess.SessionNotFoundException;
@@ -58,6 +59,8 @@ import android.widget.Toast;
 
 public class BasicDetailsFragment extends Fragment {
 
+    private final String TAG = BasicDetailsFragment.class.getName();
+
     private RecordInfo record;
     private Integer position;
     private Integer total;
@@ -286,10 +289,10 @@ public class BasicDetailsFragment extends Fragment {
         if (search != null)
             current_org = search.selectedOrganization.id;
 
-        System.out.println("Size " + record.copyCountListInfo.size());
+        Log.d(TAG, "Size " + record.copyCountListInfo.size());
 
         for (int i = 0; i < record.copyCountListInfo.size(); i++) {
-            System.out.println(current_org + " "
+            Log.d(TAG, current_org + " "
                     + record.copyCountListInfo.get(i).org_id + " "
                     + record.copyCountListInfo.get(i).count);
             if (record.copyCountListInfo.get(i).org_id == current_org) {
index 0d5aa91..33113ea 100644 (file)
@@ -46,7 +46,7 @@ import android.widget.Toast;
 public class ApplicationPreferences extends PreferenceActivity implements
         OnSharedPreferenceChangeListener {
 
-    private String TAG = ApplicationPreferences.class.getSimpleName();
+    private final String TAG = ApplicationPreferences.class.getName();
 
     private ProgressDialog progressDialog;
 
index 5b14dcb..f27c4d3 100644 (file)
@@ -40,7 +40,7 @@ import android.util.Log;
  *
  */
 public class LoadingTask {
-    private String TAG = "LoadingTask";
+    private final String TAG = LoadingTask.class.getName();
     
     public static final String TASK_OK = "OK";
 
index 6a93ebc..f65f6b6 100644 (file)
@@ -13,7 +13,7 @@ import android.util.Log;
 
 public class AccountAuthenticator extends AbstractAccountAuthenticator {
     
-    private final String TAG = "eg.auth";
+    private final String TAG = AccountAuthenticator.class.getName();
     private Context context;
 
     public AccountAuthenticator(Context context) {
index e2667b0..037452c 100644 (file)
@@ -21,7 +21,7 @@ import android.widget.TextView;
 
 public class AuthenticatorActivity extends AccountAuthenticatorActivity {
 
-    private final String TAG = "eg.auth";
+    private final String TAG = AuthenticatorActivity.class.getName();
 
     public final static String ARG_ACCOUNT_TYPE = "ACCOUNT_TYPE";
     public final static String ARG_AUTH_TYPE = "AUTH_TYPE";
index 7e5ee9b..b1eef4e 100644 (file)
@@ -99,18 +99,18 @@ public class EvergreenAuthenticator {
         
         // parse response
         String textcode = ((Map<String, String>) resp).get("textcode");
-        System.out.println("textcode: " + textcode);
+        Log.d(TAG, "textcode: " + textcode);
         if (textcode.equals("SUCCESS")) {
             Object payload = ((Map<String, String>) resp).get("payload");
-            System.out.println("payload: " + payload);
+            Log.d(TAG, "payload: " + payload);
             String authtoken = ((Map<String, String>) payload).get("authtoken");
-            System.out.println("authtoken: " + authtoken);
+            Log.d(TAG, "authtoken: " + authtoken);
             Integer authtime = ((Map<String, Integer>) payload).get("authtime");
-            System.out.println("authtime: " + authtime);
+            Log.d(TAG, "authtime: " + authtime);
             return authtoken;
         } else if (textcode.equals("LOGIN_FAILED")) {
             String desc = ((Map<String, String>) resp).get("desc");
-            System.out.println("desc: "+desc);
+            Log.d(TAG, "desc: "+desc);
             if (!TextUtils.isEmpty(desc)) {
                 throw new AuthenticationException(desc);
             }
index 370ffcc..5d5625c 100644 (file)
@@ -178,9 +178,6 @@ public class IDLParser {
             HashMap fields = current.getFields();
             String fieldNames[] = new String[fields.size()];
 
-            if (current.getIDLClass().equals("payments_combined_detail") || current.getIDLClass().equals("ahr")) {
-                System.out.println("kcxxx");
-            }
             for(Iterator itr = fields.keySet().iterator(); itr.hasNext(); ) {
                 String key = (String) itr.next();
                 IDLField field = (IDLField) fields.get(key);
index 632c28e..ff17a0b 100644 (file)
@@ -8,7 +8,6 @@ public class TestIDL {
         String idlFile = "fm_IDL.xml";
         IDLParser parser = new IDLParser(idlFile);
         parser.parse();
-        //System.out.print(parser.toXML());
 
         OSRFObject bre = new OSRFObject("bre");
         bre.put("id", new Integer(1));