android.util.log输出内容中有线程id吗

 我来答
匿名用户
2017-03-23
展开全部
当然他是用DDMS的衡租搏LogCat来查咐祥看,上面分别有显示V,D,I,W,E D:表示Debug,就是代码中的Log.d("tips","Degug"); V:表示View,就是代码中的Log.v("tips","Verbose"); I:表示Debug,就是代码中的Log.i("tips","info"); E:表示Debug,就是代码中的Log.e("tips","Error"型高); …………………… 不同的方法在logCat里面显示的颜色不同,你可以根据你的需要来决定用哪个方法,然后通过上面的V,D,I,W,E来过滤掉你不需要的东西 Verbose should never be compiled into an application except during development. Debug logs are compiled in but stripped at runtime. Error, warning and info logs are always kept. Tip: Don't forget that when you make a call like Log.v(TAG, "index=" + i); that when you're building the string to pass into Log.d, Java uses a StringBuilder and at least three allocations occur: the StringBuilder itself, the buffer, and the String object. Realistically, there is also another buffer allocation and copy, and even more pressure on the gc. That means that if your log message is filtered out, you might be doing significant work and incurring significant overhead.
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
收起 1条折叠回答
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式