Android Log logE(String log)

Here you can find the source of logE(String log)

Description

log E

License

Open Source License

Declaration

public static void logE(String log) 

Method Source Code

//package com.java2s;
/**/*from   ww w. j  a  v a 2  s.c  om*/
 * Copyright (C) <2013>  <Shaking Earth Digital>

 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
 the Free Software Foundation, either version 3 of the License, or
 (at your option) any later version.

 This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
 */

import android.util.Log;

public class Main {
    /**
     * Turn debugging on or off
     */
    private static final boolean DEBUG = true;
    /**
     * Tag to be used for static calls
     */
    private static final String sTAG = "LogUtil";
    private String TAG = sTAG;

    public static void logE(String log) {
        if (DEBUG) {
            Log.e(sTAG, log);
        }
    }

    public static void logE(String log, Throwable tr) {
        if (DEBUG) {
            Log.e(sTAG, log, tr);
        }
    }

    public void e(String log) {
        if (DEBUG) {
            Log.e(TAG, log);
        }
    }

    public void e(String log, Throwable tr) {
        if (DEBUG) {
            Log.e(TAG, log, tr);
        }
    }
}

Related

  1. w(String tag, Throwable tr)
  2. wtf(String tag, String msg)
  3. wtf(String tag, Throwable tr)
  4. wtf(String tag, String msg, Throwable tr)
  5. log(String log)
  6. logE(String log, Throwable tr)
  7. logW(String log)
  8. logW(String log, Throwable tr)
  9. Log(String msg)