Esempio n. 1
0
  public static void printException(Context ctx, Exception ex) {
    try {
      if (LibConf.ISRELEASE) return;

      Log.d(LibConf.LOGTAG, ComUtil.conStr("\r\n[ & ]", ex.getClass().toString()));
      Log.d(LibConf.LOGTAG, ComUtil.conStr("    &", ex.getMessage()));

      for (int i = 0; i < ex.getStackTrace().length; i++) {
        Log.d(LibConf.LOGTAG, "    " + ex.getStackTrace()[i].toString());
      }
    } catch (Exception e) {
    }
  }
Esempio n. 2
0
  public static void printException(Context ctx, String msg, Exception ex) {
    try {
      if (LibConf.ISRELEASE) return;

      Log.d(LibConf.LOGTAG, ComUtil.conStr("[ & ]", ex.getClass().toString()));
      Log.d(LibConf.LOGTAG, ComUtil.conStr("    CONTEXT=[&]", ctx.toString()));
      Log.d(LibConf.LOGTAG, ComUtil.conStr("    MESSAGE=[&]", msg));
      Log.d(LibConf.LOGTAG, ComUtil.conStr("    &", ex.getMessage()));
      for (int i = 0; i < ex.getStackTrace().length; i++) {
        Log.d(LibConf.LOGTAG, ex.getStackTrace()[i].toString());
      }
    } catch (Exception e) {
      Log.d(LibConf.LOGTAG, "[ printException error ]");
      e.printStackTrace();
    }
  }
Esempio n. 3
0
  public static void printResMsg(Context ctx, String tranCd, Object obj, String className) {
    JSONArray jarr, jarr2;
    JSONObject jobj, jobj2;
    String key, buf;
    try {
      if (LibConf.ISRELEASE) return;

      jarr = (JSONArray) obj;

      buf = LibConf.NEW_LINE + "[ RESPONSE MESSAGE RECEIVE ]";
      Log.d(LibConf.LOGTAG, buf);

      buf = ComUtil.conStr("TRANCD=[&]", tranCd);
      Log.d(LibConf.LOGTAG, buf);

      if (className != null) {
        buf = ComUtil.conStr("CLASS NAME=[&]", className);
        Log.d(LibConf.LOGTAG, buf);
      }

      for (int i = 0; i < jarr.length(); i++) {
        jobj = jarr.getJSONObject(i);

        for (Iterator<String> iter = jobj.keys(); iter.hasNext(); ) {
          key = iter.next();

          Log.d(LibConf.LOGTAG, "    (" + i + ")" + key + "=[" + jobj.get(key).toString() + "]");

          /*					if(jobj.get(key).toString().length() <= 2 || ! jobj.get(key).toString().substring(0, 2).equals("[{")) {
          	continue;
          }

          jarr2 = jobj.getJSONArray(key);
          for(int j = 0; j < jarr2.length(); j++) {
          	jobj2 = jarr2.getJSONObject(j);

          	for(Iterator<String> iter2 = jobj2.keys(); iter2.hasNext();) {
          		key = iter2.next();
          		Log.d(Conf.LOGTAG, "        (" + j + ")" + key + "=[" + jobj2.get(key).toString() + "]");
          	}
          }*/
        }
      }
    } catch (Exception e) {
      e.printStackTrace();
    }
  }
Esempio n. 4
0
  public static void printReqMsg(Context ctx, String tranCd, HashMap<String, Object> reqMsg) {
    String key, buf;
    if (LibConf.ISRELEASE) return;
    try {
      buf = LibConf.NEW_LINE + "[ REQUEST MESSAGE SEND ]";
      Log.d(LibConf.LOGTAG, buf);

      buf = ComUtil.conStr("TRANCD=[&]", tranCd);
      Log.d(LibConf.LOGTAG, buf);

      if (reqMsg == null) return;

      for (Iterator<String> iter = reqMsg.keySet().iterator(); iter.hasNext(); ) {
        key = iter.next();
        Log.d(LibConf.LOGTAG, "    (0)" + key + "=[" + reqMsg.get(key).toString() + "]");
      }
    } catch (Exception e) {
      Log.d(LibConf.LOGTAG, "[ printReqMsg error ]");
    }
  }
 public String getUSERPASS() throws JSONException, Exception {
   ComUtil.printLog("Method GET", "mmmmmmmmmm" + mLayout.getField(IDX_USER_PASS).getId());
   return getString(mLayout.getField(IDX_USER_PASS).getId()); // get USER_PASS
 }