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 void LOG_E(Class<?> paramClass, String paramString) {
    String str = paramClass.getName();
    Log.e(LOG_TAG, str + " -> " + paramString);
}

From source file:Main.java

public static void addLoge(String message) {
    if (DEBUG_FLG) {
        Log.e(TAG, message);
    }
}

From source file:Main.java

public static String GetSpinnerValue(Spinner sp) {

    if (sp.getVisibility() == View.VISIBLE) {
        Log.e("Error in Get Spinner : ", String.valueOf(sp.getId()));
        return ((sp).getSelectedItem().toString().substring(0,
                (sp).getSelectedItem().toString().lastIndexOf(":"))).trim();

    } else {//from  w w w. j av  a  2  s. co  m
        return "";
    }
}

From source file:Main.java

public static void logErrorStackTrace(Object source, Exception e, String msg) {
    String tag = source.getClass().getSimpleName();
    Log.e(tag, msg + ": " + e.getClass().getSimpleName() + ":");
    Log.e(tag, Log.getStackTraceString(e));
}

From source file:Main.java

public static boolean checkString(String s) {

    boolean isEmpty;

    try {//from www .java  2 s . co m
        isEmpty = s.isEmpty();
    } catch (NullPointerException ex) {
        Log.e("checkString", "String is NULL !!");
        return false;
    }

    return !isEmpty;
}

From source file:Main.java

public static void e(String... s) {
    if (debugEnabled) {
        Log.e(LOGTAG, getDebugInfo() + getLogInfoByArray(s));
    }
}

From source file:Main.java

public static float compute(String op1, String op2, char operator) {

    float o1 = Float.parseFloat(op1);
    float o2 = Float.parseFloat(op2);

    Log.e("Operand 1", op1);
    Log.e("Operand 2", op2);
    Log.e("Operator", operator + "");

    switch (operator) {
    case '-':
        return (o1 - o2);
    case '+':
        return (o1 + o2);
    case '/':
        return (o1 / o2);
    case '*':
        return (o1 * o2);
    default:/* www. j  a v  a2  s. com*/
        break;
    }
    return -1;
}

From source file:Main.java

public static void e(Object logStr) {
    Log.e(TAG, defaultPreStr + logStr);
}

From source file:Main.java

private static void levelPrint(String str, int level) {
    String delim = "  ";
    String out = "";
    for (int i = 0; i < level; i++)
        out += delim;//ww w .j av a  2 s . c  o m
    out += str;
    Log.e("LOGSHIT", out);
}

From source file:Main.java

public static void moveCorruptedFileToBackup(File f) {
    if (!f.exists())
        return;/*w w  w.j  a va 2 s . c  om*/
    Log.e("cr3", "Moving corrupted file " + f + " to backup.");
    File backup = getBackupFileName(f, false);
    f.renameTo(backup);
}