简单日志封装类:

public final class CLog {
public static final boolean DEBUG = true; private CLog() {
} public static void d(String tag, String desc) {
if (DEBUG)
Log.d(tag, desc);
} public static void d(String tag, String desc, Throwable tr) {
if (DEBUG)
Log.d(tag, desc, tr);
} public static void v(String tag, String desc) {
if (DEBUG)
Log.v(tag, desc);
}
public static void v(String tag, String desc, Throwable tr) {
if (DEBUG)
Log.v(tag, desc);
} public static void w(String tag, String desc) {
if (DEBUG)
Log.w(tag, desc);
} public static void w(String tag, Throwable ioe) {
if (DEBUG)
Log.w(tag, ioe);
} public static void w(String tag, String desc, Throwable e) {
if (DEBUG)
Log.w(tag, desc, e);
} public static void i(String tag, String desc) {
if (DEBUG)
Log.i(tag, desc);
} public static void i(String tag, String desc, Throwable tr) {
if (DEBUG)
Log.i(tag, desc, tr);
} public static void e(String tag, String desc) {
if (DEBUG)
Log.e(tag, desc);
} public static void e(String tag, String desc, Throwable tr) {
if (DEBUG)
Log.e(tag, desc, tr);
}
}

  

Android Logcat 封装类的更多相关文章

  1. android logcat里面AndroidRuntime FATAL EXCEPTION: main这个是什么问题啊。

    android logcat里面AndroidRuntime FATAL EXCEPTION: main这个是什么问题啊. http://zhidao.baidu.com/link?url=mUI11 ...

  2. Android logcat使用

    Android logcat使用 1. Android日志说明 当Android系统运行的时候,会搜集所有的系统信息. logcat是Android系统的一个命令行工具,主要用来查看和过滤日志信息. ...

  3. Eclipse设置Android Logcat输出字体大小

    Window -> Preferences -> Android -> Logcat -> Display Font:点击"Change"button 如图 ...

  4. 安卓 logcat设置 Android logcat Settings

    安卓 logcat设置 Android logcat Settings 作者:韩梦飞沙 Author:han_meng_fei_sha 邮箱:313134555@qq.com E-mail: 3131 ...

  5. Android Logcat信息级别解读

    Android Logcat信息级别解读 Logcat信息分为好几个级别,分别是:Assert(断言).Debug(调试).Error(错误).Info(信息).Verbose(详细).Warning ...

  6. Android logcat详细用法

      admin| 2011-10-29 11:16| 分类:学习文档| Android logcat | 评论:[0]| Android日志系统提供了记录和查看系统调试信息的功能.日志都是从各种软件和 ...

  7. Android(Logcat、Monitors)

    刚学习Android 的时候总喜欢输出"Hello Word"这样的信息来判断是不是执行了某个方法,最初连Android Studio控制台.断点这些在哪里都要找好久,现在好了多点 ...

  8. Android logcat

    logcat是Android中一个命令行工具,可以用于得到程序的log信息. 基本命令 logcat使用方法如下所示: [adb] logcat [<option>] ... [<f ...

  9. Android LogCat使用详解

    Android的Logcat用于显示系统的调试信息,可在分别以下几个地方查看和调用logcat: 1.eclipse的Debug模式或DDMS模式下的会有一个Logcat窗口,用于显示log日志 只需 ...

随机推荐

  1. liunx 服务内存消耗100% 怎么处理

      一.排查问题 查看内存使用 free 查看进程使用存储状况.看是不是业务进程在消耗存储,如果是就要优化业务代码了 使用top 命令 如果不是怎么办 二.处理办法 1.把没有用到的消耗内存的服务进程 ...

  2. Mac OSX - 如何在bash_profile中配置全局环境变量

    我们知道,在Linux操作系统下,配置环境变量是使用如下命令: vim /etc/profile 在OSX下,我们用如下命令打开环境变量配置文件: open ~/.bash_profile 典型的环境 ...

  3. 每日英语:why can't China produce world-class CEO?

    The appointment of India-born Satya Nadella as Microsoft Corp.'s CEO has caused a bit of a stir in C ...

  4. dubbo 2.5.4-SNAPSHOT dubbo-admin 报错

    问题描述: RROR context.ContextLoader - Context initialization failed org.springframework.beans.factory.B ...

  5. 在线制作h5

    在线制作h5 官网:http://www.godgiftgame.com 在线制作h5首页预览效果图如下: 一.主要功能区域主要功能区域分布在上中左右三个地方,1.上面区域是功能选择区,包括图片素材. ...

  6. Linux 导入epel源

    rpm -ivh  http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm rpm -ivh http:// ...

  7. Activity跳转时生命周期跟踪

    1. 步骤1(打开First Activity):经过onCreate.onStart.onResume后First Activity就展现啦: 2. 步骤2(跳转至Second Activity): ...

  8. C primer plus 练习题 第五章

    1. #include <stdio.h> #define MINU 60 int main() { int minute, hour, m; printf("请输入分钟:&qu ...

  9. 【Android】如何写一个JsBridge

    JsBridge 简介 Android JsBridge 就是用来在 Android app的原生 java 代码与 javascript 代码中架设通信(调用)桥梁的辅助工具. 原文地址点这里 gi ...

  10. [翻译]使用Swift在Xcode中创建自定义控件

    使用Swift在Xcode中创建自定义控件 原文 IBDesignable and IBInspectable With IBDesignable and IBInspectable, develop ...