开发者

Enable internal logging in Android emulator WebKit?

For example, this file contains logging statements:

http://hi-android.info/src/android/webkit/CacheManager.java.html

Log.w() and such.

They do not seem to appear in LogMan output, even though the verbosity level is correct. Since this is system software, I suspect these loggings are disabled by default.

How it is possible to enable them in Android emula开发者_如何学Pythontor? Is rebuild needed?

I am needing this info for debugging some caching problems with only occur with Android WebKit.


here is the solution for this king of logging/tracing.

I assume you are using Eclipse and ADT. For command line the approach is similar. First lookup your process id(pid), then see LogCat for this pid with specified level.

Steps for Eclipse:

  1. start emulator, open app you are going to see the traces. in my example it is com.android.browser but you can use any application you want
  2. in Eclipse use Window -> Show View -> Other... -> Android -> Devices this will open the devices tool for Android and will show you the process list with their ids (pid)
  3. Find your process and remember it's pid. Let's say the pid is 293
  4. Open LogCat tool (Window -> Show View -> Other... -> Android -> LogCat)
  5. Press + (create a filter)
  6. enter filter name (My custom filter); leave "by Log Tag" blank; enter pid you remember into "by pid"; enter "by log level" (Verbose); press OK

this will create another tab in LogCat window and will show only the traces from this particular process you chose. Hope it helps.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜