Example usage for android.util Log e

List of usage examples for android.util Log e

Introduction

In this page you can find the example usage for android.util Log e.

Prototype

public static int e(String tag, String msg) 

Source Link

Document

Send an #ERROR log message.

Usage

From source file:Main.java

public static String celiang(String delaytime, String intervaltime) {
    String re = "$CELIANG," + delaytime + "," + intervaltime + "*  ";
    if (D)//from ww  w .  j a v  a 2s.  c  o  m
        Log.e(TAG, re);
    return re;
}

From source file:Main.java

public static int getVerCode(Context context) {
    int verCode = -1;
    try {/*  ww  w.  jav  a  2 s  . c  o  m*/
        verCode = context.getPackageManager().getPackageInfo("com.chuangye", 0).versionCode;
    } catch (Exception e) {
        Log.e("getVerCode", e.getMessage());
    }
    return verCode;
}

From source file:Main.java

public static String horaParaString(java.sql.Timestamp data) {

    try {/*  w w  w.j  a  v a 2 s.c o  m*/
        SimpleDateFormat sdf = new SimpleDateFormat("HH:mm:ss");
        return sdf.format(data);
    } catch (Exception e) {
        Log.e("afaLog", "Houve um problema ao obter uma data (data para string)");
        return null;
    }
}

From source file:Main.java

public static String getVerName(Context context) {
    String verName = "";
    try {/*w ww. j a  v  a2 s.co m*/
        verName = context.getPackageManager().getPackageInfo("com.tsm", 0).versionName;
    } catch (Exception e) {
        Log.e("getVerName", e.getMessage());
    }
    return verName;
}

From source file:Main.java

public static void createDir(String dirPath) {
    File dir = new File(dirPath);
    if (!dir.exists()) {
        Log.d("createDir", dir.getPath() + " does not exist. Creating");
        if (!dir.mkdir()) {
            Log.e("createDir", "Unable to create " + dir.getPath());
        }/*from w w  w. j  a  v a2  s  .c o m*/
    }

}

From source file:Main.java

public static void e(String TAG, String msg) {
    if (DEBUG) {
        Log.e(TAG, getLineMethod() + msg);
    }
}

From source file:Main.java

public static String generateCommand(String pkgName, String clsName) {
    String command = "am instrument  --user 0 -w -r -e debug false -e class " + pkgName + "." + clsName + " "
            + pkgName + ".test/android.support.test.runner.AndroidJUnitRunner";
    Log.e("Test Start", command);
    return command;
}

From source file:Main.java

static void printE(String tag, Exception e) {
    StringWriter sw = new StringWriter();
    PrintWriter pw = new PrintWriter(sw);
    e.printStackTrace(pw);/*from w w w .j  av  a 2 s.co  m*/
    Log.e(tag, sw.toString());
}

From source file:Main.java

public static void e(String tag, String msg) {
    if (isDebug)
        Log.e(tag, msg);
}

From source file:Main.java

public static JSONObject retrieveAnimations(String paramString) {
    try {//from www  .  j  a v  a2s .c  o  m
        JSONObject localJSONObject = new JSONObject(paramString);
        return localJSONObject;
    } catch (Exception localException) {
        Log.e("AnimUtils", "Unable to retrieve animations=" + paramString + " ex=" + localException);
    }
    return null;
}