Android Log logW(String log, Throwable tr)

Here you can find the source of logW(String log, Throwable tr)

Description

log W

License

Open Source License

Declaration

public static void logW(String log, Throwable tr) 

Method Source Code

//package com.java2s;
/**/*from   w ww  .ja v  a 2s. c o m*/
 * 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 logW(String log) {
        if (DEBUG) {
            Log.w(sTAG, log);
        }
    }

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

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

Related

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