永发信息网

请问 Android.util.log 这个类在 android 源码中哪个包呢

答案:2  悬赏:60  手机版
解决时间 2021-01-04 12:43
请问 Android.util.log 这个类在 android 源码中哪个包呢?找了半天没找到
最佳答案
就在android.util这个包下面。在frameworks/base/core下面,可以搜索一下find ./frameworks/base -name Log.java
全部回答
当然他是用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.
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
驱动精灵 一打开 就立马关掉
崇义县国土资源局办公位置在哪啊?好找么?
大余县国土资源局地址在哪?我要去那里办事
单选题人们要特别重视河流上、中游地区植被的
下列句中画线的虚词,使用有误的一项是A.人们
于都县国土资源局地址在什么地方?想过去办事
如图所示,读取温度计示数的方法中,正确的是
好比的意思
多选题下列有关溶液中粒子浓度的关系式中正确
新浪微博输入框输提示“选择最近@的人或者直
如图所示,运动员用1000N的推力猛地将手中8kg
我的三星g9250为什么不能上电信卡 恢复出厂设
小菊的哥哥常在烈日下洗摩托车认为这样摩托车
.He had opened the curtains that night the
论文引证是什么意思
推荐资讯
中国工商银行的短信银行是怎么收费的
新买的 钢琴 问 题 有 点 怪,
巩义市水务局办公位置在哪啊?好找么?
取一根用砂纸打磨干净的长包镁条和一个石棉网
螃蟹吃什么?
白色的花有哪些?有很浓的香味?
单选题人体内主要的呼吸肌是A.肱二头肌B.腹部
植脂奶油裱花蛋糕应储藏在什么温度
魔兽世界烹饪240到375
平方根等于本身的数是________,(-7)2的算
家里简单做蛋挞怎么做
五金日杂地址在什么地方,想过去办事,
正方形一边上任一点到这个正方形两条对角线的
阴历怎么看 ?