• <li id="00i08"><input id="00i08"></input></li>
  • <sup id="00i08"><tbody id="00i08"></tbody></sup>
    <abbr id="00i08"></abbr>
  • 新聞中心

    EEPW首頁 > 嵌入式系統 > 設計應用 > Android 框架簡介

    Android 框架簡介

    作者: 時間:2016-09-12 來源:網絡 收藏

    * significant work and incurring significant overhead.

    */

    public final class Log {

    /**

    * Priority constant for the println method; use Log.v.

    */

    public static final int VERBOSE = 2;

    /**

    * Priority constant for the println method; use Log.d.

    */

    public static final int DEBUG = 3;

    /**

    * Priority constant for the println method; use Log.i.

    */

    public static final int INFO = 4;

    /**

    * Priority constant for the println method; use Log.w.

    */

    public static final int WARN = 5;

    /**

    * Priority constant for the println method; use Log.e.

    */

    public static final int ERROR = 6;

    /**

    * Priority constant for the println method.

    */

    public static final int ASSERT = 7;

    /**

    * Exception class used to capture a stack trace in {@link #wtf()}.

    */

    private static class TerribleFailure extends Exception {

    TerribleFailure(String msg, Throwable cause) { super(msg, cause); }

    }

    private Log() {

    }

    /**

    * Send a {@link #VERBOSE} log message.

    * @param tag Used to identify the source of a log message. It usually identifies

    * the class or activity where the log call occurs.

    * @param msg The message you would like logged.

    */

    public static int v(String tag, String msg) {

    return println_native(LOG_ID_MAIN, VERBOSE, tag, msg);

    }

    /**

    * Send a {@link #VERBOSE} log message and log the exception.

    * @param tag Used to identify the source of a log message. It usually identifies

    * the class or activity where the log call occurs.

    * @param msg The message you would like logged.

    * @param tr An exception to log

    */

    public static int v(String tag, String msg, Throwable tr) {

    return println_native(LOG_ID_MAIN, VERBOSE, tag, msg + '/n' + getStackTraceString(tr));

    }

    /**

    * Send a {@link #DEBUG} log message.

    * @param tag Used to identify the source of a log message. It usually identifies

    * the class or activity where the log call occurs.

    * @param msg The message you would like logged.

    */

    public static int d(String tag, String msg) {

    return println_native(LOG_ID_MAIN, DEBUG, tag, msg);

    }

    /**

    * Send a {@link #DEBUG} log message and log the exception.

    * @param tag Used to identify the source of a log message. It usually identifies

    * the class or activity where the log call occurs.

    * @param msg The message you would like logged.

    * @param tr An exception to log

    */

    public static int d(String tag, String msg, Throwable tr) {

    return println_native(LOG_ID_MAIN, DEBUG, tag, msg + '/n' + getStackTraceString(tr));

    }

    /**

    * Send an {@link #INFO} log message.

    * @param tag Used to identify the source of a log message. It usually identifies

    * the class or activity where the log call occurs.

    * @param msg The message you would like logged.

    */

    public static int i(String tag, String msg) {

    return println_native(LOG_ID_MAIN, INFO, tag, msg);

    }

    /**

    * Send a {@link #INFO} log message and log the exception.

    * @param tag Used to identify the source of a log message. It usually identifies

    * the class or activity where the log call occurs.

    * @param msg The message you would like logged.

    * @param tr An exception to log

    */

    public static int i(String tag, String msg, Throwable tr) {

    return println_native(LOG_ID_MAIN, INFO, tag, msg + '/n' + getStackTraceString(tr));

    }

    /**

    * Send a {@link #WARN} log message.

    * @param tag Used to identify the source of a log message. It usually identifies

    * the class or activity where the log call occurs.

    * @param msg The message you would like logged.

    */

    public static int w(String tag, String msg) {

    return println_native(LOG_ID_MAIN, WARN, tag, msg);

    }

    /**

    * Send a {@link #WARN} log message and log the exception.

    * @param tag Used to identify the source of a log message. It usually identifies

    * the class or activity where the log call occurs.

    * @param msg The message you would like logged.

    * @param tr An exception to log

    */

    public static int w(String tag, String msg, Throwable tr) {

    return println_native(LOG_ID_MAIN, WARN, tag, msg + '/n' + getStackTraceString(tr));

    }

    /**

    * Checks to see whether or not a log for the specified tag is loggable at the specified level.

    *

    * The default level of any tag is set to INFO. This means that any level above and including



    關鍵詞: Android 框架簡介

    評論


    相關推薦

    技術專區

    關閉
    主站蜘蛛池模板: 黔东| 盐边县| 五常市| 沐川县| 泗阳县| 天柱县| 城步| 大厂| 徐水县| 石台县| 杭锦后旗| 衡阳县| 理塘县| 达州市| 石楼县| 香港 | 绥化市| 紫阳县| 芒康县| 蛟河市| 封丘县| 永兴县| 昌黎县| 喀喇沁旗| 凉山| 吴桥县| 鸡泽县| 博野县| 砚山县| 正宁县| 延庆县| 新兴县| 台安县| 南阳市| 永川市| 中西区| 竹山县| 富源县| 江口县| 荣成市| 长寿区|