List of usage examples for android.util Log WARN
int WARN
To view the source code for android.util Log WARN.
Click Source Link
From source file:Main.java
public static void wran(String msg) { if (isLog) { log(DEFAULT_TAG, Log.WARN, msg, null); } }
From source file:Main.java
public static int w(String tag, String msg) { return println(Log.WARN, tag, msg); }
From source file:Main.java
public static int w(String tag, String msg, Throwable tr) { return println(Log.WARN, tag, msg + '\n' + getStackTraceString(tr)); }
From source file:Main.java
public static void w(String tag, Object... messages) { log(tag, Log.WARN, null, messages); }
From source file:Main.java
public static int w(String tag, Throwable tr) { return println(Log.WARN, tag, getStackTraceString(tr)); }
From source file:Main.java
public static void w(String tag, Throwable t, Object... messages) { log(tag, Log.WARN, t, messages); }
From source file:Main.java
private static void log(String tag, int level, String msg, Throwable tr) { if (isLog) {/*from w ww . j a va 2 s . c om*/ switch (level) { case Log.VERBOSE: if (tr == null) { Log.v(tag, msg); } else { Log.v(tag, msg, tr); } break; case Log.INFO: if (tr == null) { Log.i(tag, msg); } else { Log.i(tag, msg, tr); } break; case Log.DEBUG: if (tr == null) { Log.d(tag, msg); } else { Log.d(tag, msg, tr); } break; case Log.WARN: if (tr == null) { Log.w(tag, msg); } else { Log.w(tag, msg, tr); } break; case Log.ERROR: if (tr == null) { Log.e(tag, msg, tr); } else { Log.e(tag, msg, tr); } break; } } }
From source file:Main.java
/** * @param message Message to display * @param type [Log.Error, Log.Warn, ...] * @param shouldPrint value that comes from Preferences which allows the user to decide if debug info should be printed to logcat. Error info will ALWAYS be displayed despite this value *///from www . j a v a2s. c om public static void debugFunc(String message, int type, boolean shouldPrint) { // errors must always be displayed if (type == Log.ERROR) { Log.e(LOG_TAG, message); } else if (shouldPrint) { switch (type) { case Log.DEBUG: Log.d(LOG_TAG, message); break; case Log.INFO: Log.i(LOG_TAG, message); break; case Log.VERBOSE: Log.v(LOG_TAG, message); break; case Log.WARN: Log.w(LOG_TAG, message); break; default: Log.v(LOG_TAG, message); break; } } }
From source file:Main.java
private static void print(int mode, final String tag, String msg) { if (!isPrint) { return;//from w w w.j a v a2s .c o m } if (msg == null) { Log.e(tag, MSG); return; } switch (mode) { case Log.VERBOSE: Log.v(tag, msg); break; case Log.DEBUG: Log.d(tag, msg); break; case Log.INFO: Log.i(tag, msg); break; case Log.WARN: Log.w(tag, msg); break; case Log.ERROR: Log.e(tag, msg); break; default: Log.d(tag, msg); break; } }
From source file:de.escoand.readdaily.DownloadHandler.java
public static long startInvisibleDownload(final Context context, final String url, final String title) { DownloadManager manager = (DownloadManager) context.getSystemService(Context.DOWNLOAD_SERVICE); String name = String.valueOf(new Random().nextInt()); LogHandler.log(Log.WARN, "load invisible " + url); long id = manager.enqueue(new DownloadManager.Request(Uri.parse(url)).setTitle(title)); Database.getInstance(context).addDownload(name, id, null); return id;/*from w w w . j av a 2 s. c o m*/ }