开发者

running logcat on Eclipse

开发者 https://www.devze.com 2023-03-27 17:37 出处:网络
I sear开发者_如何学Cched through whole internet but I still don\'t understand how I need to set up logCat what it would run. Could someone help with this? In the main menu, choose Window > Open Perspe

I sear开发者_如何学Cched through whole internet but I still don't understand how I need to set up logCat what it would run. Could someone help with this?


In the main menu, choose Window > Open Perspective > Other. In the dialog that appears, choose DDMS. LogCat will be the tool at the bottom of that perspective (by default -- you can reposition it).


Logcat usage is tagbased. You develop your Application and when you want to log something you say:

Log.i("CUSTOM", "getting old data!");

then you go into Logcat and define a Custom Filter, there is an option to filter by TAG. This is the first parameter on your Log.i call, so for example you define a filter for your "CUSTOM"-Tag. Now you have a new tab in your logcat that holds all your CUSTOM-logmessages.

hope that helps

0

精彩评论

暂无评论...
验证码 换一张
取 消